getsentry / getsentry/sentry-dotnet

feat: add Attributes APIs

Open
#4,882 4 comments 0 reactions 1 assignee Claimed by @Flash0ver View on GitHub
.NET Feature Logs Metrics public API
Dominant language
C#
Stars
770
Forks
248
Avg merge
3d 4h
Merged PRs (30d)
49

Description

### 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
1. Scope Attributes
1. SDK-APIs
- Attributes passed via `SentrySdk.Logger.Log{SentryLogLevel}` methods
- Attributes passed via `SentrySdk.Experimental.Metrics.Emit{SentryMetricType}` methods
1. Option-APIs
- Attributes set via `SentryOptions.SetBeforeSendLog(Func)`
- Attributes set via `SentryOptions.SetBeforeSendMetric(Func, SentryMetric?>)`

Add `Attributes` APIs for
- Logs
- Metrics
- Scopes

See related docs
- Logs: https://develop.sentry.dev/sdk/telemetry/logs/
- Metrics: https://develop.sentry.dev/sdk/telemetry/metrics/
- Scopes: https://develop.sentry.dev/sdk/telemetry/scopes/
- Attributes: https://develop.sentry.dev/sdk/telemetry/attributes/

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.