Skip to content

feat: add Attributes APIs #4882

@Flash0ver

Description

@Flash0ver

Description

Attributes are searchable Name-Value-Pairs with a Type and an optional Unit

  • where currently supported Types for the Values are
    • string and string[]
    • boolean and boolean[]
    • integer and integer[] (64-bit signed integral number)
    • double and double[] (64-bit floating-point number)
  • where the optional Units must be supported by Relay
    • may be removed or set to none otherwise

Precedence of Attributes on Logs and Metrics - higher priorities overwrite lower priorities:

  1. Default Attributes
  2. Scope Attributes
  3. SDK-APIs
    • Attributes passed via SentrySdk.Logger.Log{SentryLogLevel} methods
    • Attributes passed via SentrySdk.Experimental.Metrics.Emit{SentryMetricType} methods
  4. Option-APIs
    • Attributes set via SentryOptions.SetBeforeSendLog(Func<SentryLog, SentryLog?>)
    • Attributes set via SentryOptions.SetBeforeSendMetric<T>(Func<SentryMetric<T>, SentryMetric<T>?>)

Add Attributes APIs for

  • Logs
  • Metrics
  • Scopes

See related docs

In the longer term, this (may) act as a replacement / unification of Tags and Extras.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .net codeLogsMetricspublic APIAdditions/modifications to, or removals from, the public API surface area.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions