Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

New Span Schema #1230

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 145 additions & 0 deletions src/docs/sdk/event-payloads/only-spans.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
---
title: Only Spans Interface
---

```json
{
"traceId": "5B8EFFF798038103D269B633813FC60C",
"spanId": "EEE19B7EC3C1B174",
"parentSpanId": "EEE19B7EC3C1B173",
"name": "GET /example",
"startTimeUnixNano": "1544712660000000000",
"endTimeUnixNano": "1544712661000000000",
"attributes": [
{
"key": "sentry.segment.id",
Copy link
Member

Choose a reason for hiding this comment

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

Still not 100% if sentry.segment_id would be better. I personally like the nesting but the Otel docs are ambiguous about it:

Namespaces can be nested. For example telemetry.sdk is a namespace inside top-level telemetry namespace and telemetry.sdk.name is an attribute inside telemetry.sdk namespace.

but

the fact that an entity is located within another entity is typically not a sufficient reason for forming nested namespaces. The purpose of a namespace is to avoid name clashes, not to indicate entity hierarchies.

https://opentelemetry.io/docs/specs/semconv/general/attribute-naming/

When in doubt, I would keep the ..

"value": {
"stringValue": "EEE19B7EC3C1B174",
}
},
{
"key": "sentry.segment.name",
"value": {
"stringValue": "GET /example",
}
},
{
"key": "sentry.segment.op",
"value": {
"stringValue": "http.server",
}
},
{
"key": "sentry.release",
"value": {
"stringValue": "1.0.0"
}
},
{
"key": "sentry.environment",
"value": {
"stringValue": "production"
}
},
{
"key": "sentry.op",
"value": {
"stringValue": "http.server"
}
},
{
"key": "sentry.platform",
"value": {
"stringValue": "php"
}
},
{
"key": "sentry.sdk.name",
"value": {
"stringValue": "sentry.php"
}
},
{
"key": "sentry.sdk.version",
"value": {
"stringValue": "4.7.0"
}
},
cleptric marked this conversation as resolved.
Show resolved Hide resolved
// Fields from the OpenTelemetry conventions
{
"key": "client.address",
"value": {
"stringValue": "127.0.0.1",
}
},
{
"key": "url.full",
"value": {
"stringValue": "https://www.foo.bar/search?q=OpenTelemetry#SemConv",
}
},
{
"key": "user_agent.original",
"value": {
"stringValue": "CERN-LineMode/2.15 libwww/2.17b3",
}
},
{
"key": "sentry.metrics_summary.some_metric",
"value": {
"arrayValue": {
"values": [
{
"value": {
"kvlistValue": {
"values": [
{
"key": "min",
"value": {
"doubleValue": 1.0
}
},
{
"key": "max",
"value": {
"doubleValue": 2.0
}
},
{
"key": "sum",
"value": {
"doubleValue": 3.0
}
},
{
"key": "count",
"value": {
"intValue": 2
}
},
{
"key": "tags",
"value": {
"kvlistValue": {
"values": [
{
"key": "environment",
"value": {
"stringValue": "test"
}
}
]
}
}
}
]
}
}
}
]
}
}
}
]
}
```
Loading