Skip to content

[py] Investigate JS vs Python prompt trace suppression differences #5019

@jeffdh5

Description

@jeffdh5

In Python, the Dev UI was showing traces for every keystroke in the Prompt editor because RealtimeSpanProcessor exports spans one-by-one as they start (on_start), before span attributes have been set. This means the server receives child model spans before the root prompt span's genkitx:ignore-trace: true attribute is known.

Deviates slightly than JS because JS filters at telemetry server level. Python filters out before it gets there. Not sure why there's a difference but wasn't able to get it to work when supplying labels the same way as JS. Need to take a closer look to see why.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions