Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

span type/subtype: alignment step 1 #513

Merged
merged 5 commits into from
Dec 2, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
11 changes: 11 additions & 0 deletions specs/agents/tracing-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ Spans will also have a `transaction_id`, which is the `id` of the current
transaction. While not necessary for distributed tracing, this inclusion allows
for simpler and more performant UI queries.

### Transaction and Span type and subtype fields

Each transaction has a `type` field, each span has both `type` and `subtype` fields.
The values for each of those fields is protocol-specific and defined in the respective instrumenation specification
SylvainJuge marked this conversation as resolved.
Show resolved Hide resolved
for each protocol.

For spans, they must fit the [span type specification in JSON format](../../tests/agents/json-specs/span_types.json).
SylvainJuge marked this conversation as resolved.
Show resolved Hide resolved
In order to help align all agents on this specification, changing `type` and `subtype` field values is not considered
to be a _breaking change_, but rather a _potentially breaking change_ if for example existing users rely on values to
SylvainJuge marked this conversation as resolved.
Show resolved Hide resolved
build visualizations.

### Span outcome

The `outcome` property denotes whether the span represents a success or failure, it is used to compute error rates
Expand Down
24 changes: 15 additions & 9 deletions tests/agents/json-specs/span_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,37 @@
"java"
]
},
"internal": {
"__description": "Application generic internal span for controller/handler/processing delegation",
"__used_by": [
]
},
"controller": {
"__description": "Application controller actions",
"__description": "Deprecated: use app/internal instead",
SylvainJuge marked this conversation as resolved.
Show resolved Hide resolved
"__used_by": [
"ruby"
]
},
"graphql": {
"__description": "Incoming GraphQL requests",
"__description": "Deprecated: use app/internal instead",
"__used_by": [
"ruby"
]
},
"mailer": {
"__description": "Application mailer actions",
"__description": "Deprecated: use app/internal instead",
"__used_by": [
"ruby"
]
},
"resource": {
"__description": "Application resource actions",
"__description": "Deprecated: use app/internal instead",
"__used_by": [
"ruby"
]
},
"handler": {
"__description": "Application handler",
"__description": "Deprecated: use app/internal instead",
"__used_by": [
"java"
]
Expand Down Expand Up @@ -141,7 +146,8 @@
"mssql": {
"__description": "Microsoft SQL Server",
"__used_by": [
"nodejs"
"nodejs",
"java"
]
},
"mysql": {
Expand Down Expand Up @@ -177,13 +183,13 @@
]
},
"sqlite3": {
"__description": "SQLite 3",
"__description": "Deprecated: use db/sqlite",
"__used_by": [
"ruby"
]
},
"sqlserver": {
"__description": "Microsoft SQL Server",
"__description": "Deprecated: use db/mssql",
"__used_by": [
"java"
]
Expand Down Expand Up @@ -223,7 +229,7 @@
}
},
"json": {
"__description": "JSON parsing and generation",
"__description": "Deprecated: use app/internal instead",
"subtypes": {
"parse": {
"__description": "JSON parsing"
Expand Down