Skip to content

Add logLevel property to telemetry events#26548

Draft
MarioJGMsoft wants to merge 7 commits intomicrosoft:mainfrom
MarioJGMsoft:marioja/sampleProperty
Draft

Add logLevel property to telemetry events#26548
MarioJGMsoft wants to merge 7 commits intomicrosoft:mainfrom
MarioJGMsoft:marioja/sampleProperty

Conversation

@MarioJGMsoft
Copy link
Contributor

Description

Added a new optional logLevel property to telemetry events to indicate their importance for diagnostics. This enables consumers to make sampling or filtering decisions based on the event's importance level.

The property can have three values:

  • verbose — Chatty logs useful for debugging but likely not needed in production.
  • info — Session information that could be omitted in some sessions if needed.
  • essential— Critical diagnostic information that should always be transmitted.

Events without a logLevel value should be treated as essential.

Reviewer Guidance

The goal is to eventually replace the existing LogLevel type with this new property. I'd appreciate feedback on the naming of the property and its values and whether the default behavior (treating missing logLevel as essential) makes sense.

The review process is outlined on this wiki page.

@MarioJGMsoft MarioJGMsoft changed the title Marioja/sample property Add logLevel property to telemetry events Feb 25, 2026
Copy link
Contributor

@jason-ha jason-ha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're replacing LogLevel with string? Any string is okay?
How are we documenting to our customers what they should be checking?

sequenceNumber: number,
forceSend: boolean = false,
reason?: string,
logLevel?: string,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not required?
If not specified, I think we'll emit undefined. Does undefined just get dropped?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants