Skip to content

Commit 7941040

Browse files
committed
feat: Generate docs for attributes
1 parent 507a888 commit 7941040

40 files changed

+2813
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Sentry's semantic conventions align with [OpenTelemetry's semantic conventions](
99

1010
These will be a standardized naming scheme for operations and data that will be shared across the SDKs, ingest, and the product. This allows us to have a single source of truth for the semantic conventions, and also allows us to generate code for all parts of the stack (ingest, frontend, backend, data pipelines) that need to be aware of this.
1111

12+
To see the current list of attributes, see [The generated documentation](generated/attributes/index.md).
13+
1214
# Contributing
1315

1416
Running this repo requires the usage of [volta](https://volta.sh/). See instructions on installing volta on their documentation [here](https://docs.volta.sh/guide/getting-started).

generated/attributes/ai.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<!-- THIS FILE IS AUTO-GENERATED. DO NOT EDIT DIRECTLY. -->
2+
3+
# Ai Attributes
4+
5+
## ai.completion_tokens.used
6+
7+
The number of tokens used to respond to the message.
8+
9+
| Property | Value |
10+
| --- | --- |
11+
| Type | `integer` |
12+
| Has PII | false |
13+
| Exists in OpenTelemetry | No |
14+
| Example | `10` |
15+
| Aliases | `gen_ai.usage.output_tokens`, `gen_ai.usage.completion_tokens` |
16+
17+
## ai.input_messages
18+
19+
The input messages sent to the model
20+
21+
| Property | Value |
22+
| --- | --- |
23+
| Type | `string` |
24+
| Has PII | maybe |
25+
| Exists in OpenTelemetry | No |
26+
| Example | `[{"role": "user", "message": "hello"}]` |
27+
| Aliases | `gen_ai.prompt` |
28+
29+
## ai.model_id
30+
31+
The vendor-specific ID of the model used.
32+
33+
| Property | Value |
34+
| --- | --- |
35+
| Type | `string` |
36+
| Has PII | false |
37+
| Exists in OpenTelemetry | No |
38+
| Example | `gpt-4` |
39+
| Aliases | `gen_ai.response.model` |
40+
41+
## ai.prompt_tokens.used
42+
43+
The number of tokens used to process just the prompt.
44+
45+
| Property | Value |
46+
| --- | --- |
47+
| Type | `integer` |
48+
| Has PII | false |
49+
| Exists in OpenTelemetry | No |
50+
| Example | `20` |
51+
| Aliases | `gen_ai.usage.prompt_tokens`, `gen_ai.usage.input_tokens` |
52+
53+
## ai.responses
54+
55+
The response messages sent back by the AI model.
56+
57+
| Property | Value |
58+
| --- | --- |
59+
| Type | `string[]` |
60+
| Has PII | false |
61+
| Exists in OpenTelemetry | No |
62+
| Example | `["hello","world"]` |
63+
64+
## ai.streaming
65+
66+
Whether the request was streamed back.
67+
68+
| Property | Value |
69+
| --- | --- |
70+
| Type | `boolean` |
71+
| Has PII | false |
72+
| Exists in OpenTelemetry | No |
73+
| Example | `true` |
74+
75+
## ai.total_tokens.used
76+
77+
The total number of tokens used to process the prompt.
78+
79+
| Property | Value |
80+
| --- | --- |
81+
| Type | `integer` |
82+
| Has PII | false |
83+
| Exists in OpenTelemetry | No |
84+
| Example | `30` |
85+

generated/attributes/browser.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<!-- THIS FILE IS AUTO-GENERATED. DO NOT EDIT DIRECTLY. -->
2+
3+
# Browser Attributes
4+
5+
## browser.name
6+
7+
The name of the browser.
8+
9+
| Property | Value |
10+
| --- | --- |
11+
| Type | `string` |
12+
| Has PII | false |
13+
| Exists in OpenTelemetry | No |
14+
| Example | `Chrome` |
15+
16+
## browser.script.invoker
17+
18+
How a script was called in the browser.
19+
20+
| Property | Value |
21+
| --- | --- |
22+
| Type | `string` |
23+
| Has PII | false |
24+
| Exists in OpenTelemetry | No |
25+
| Example | `Window.requestAnimationFrame` |
26+
27+
## browser.script.invoker_type
28+
29+
Browser script entry point type.
30+
31+
| Property | Value |
32+
| --- | --- |
33+
| Type | `string` |
34+
| Has PII | false |
35+
| Exists in OpenTelemetry | No |
36+
| Example | `event-listener` |
37+
38+
## browser.script.source_char_position
39+
40+
A number representing the script character position of the script.
41+
42+
| Property | Value |
43+
| --- | --- |
44+
| Type | `integer` |
45+
| Has PII | false |
46+
| Exists in OpenTelemetry | No |
47+
| Example | `678` |
48+

generated/attributes/cache.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<!-- THIS FILE IS AUTO-GENERATED. DO NOT EDIT DIRECTLY. -->
2+
3+
# Cache Attributes
4+
5+
## cache.hit
6+
7+
If the cache was hit during this span.
8+
9+
| Property | Value |
10+
| --- | --- |
11+
| Type | `boolean` |
12+
| Has PII | false |
13+
| Exists in OpenTelemetry | No |
14+
| Example | `true` |
15+
16+
## cache.item_size
17+
18+
The size of the requested item in the cache. In bytes.
19+
20+
| Property | Value |
21+
| --- | --- |
22+
| Type | `integer` |
23+
| Has PII | false |
24+
| Exists in OpenTelemetry | No |
25+
| Example | `58` |
26+
27+
## cache.key
28+
29+
The key of the cache accessed.
30+
31+
| Property | Value |
32+
| --- | --- |
33+
| Type | `string` |
34+
| Has PII | false |
35+
| Exists in OpenTelemetry | No |
36+
| Example | `my-cache-key` |
37+
38+
## cache.ttl
39+
40+
The ttl of the cache in seconds
41+
42+
| Property | Value |
43+
| --- | --- |
44+
| Type | `integer` |
45+
| Has PII | false |
46+
| Exists in OpenTelemetry | No |
47+
| Example | `120` |
48+

generated/attributes/client.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!-- THIS FILE IS AUTO-GENERATED. DO NOT EDIT DIRECTLY. -->
2+
3+
# Client Attributes
4+
5+
## client.address
6+
7+
Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
8+
9+
| Property | Value |
10+
| --- | --- |
11+
| Type | `string` |
12+
| Has PII | false |
13+
| Exists in OpenTelemetry | Yes |
14+
| Example | `example.com` |
15+
| Aliases | `http.client_id` |
16+
17+
## client.port
18+
19+
Client port number.
20+
21+
| Property | Value |
22+
| --- | --- |
23+
| Type | `integer` |
24+
| Has PII | false |
25+
| Exists in OpenTelemetry | Yes |
26+
| Example | `5432` |
27+

generated/attributes/cloudflare.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!-- THIS FILE IS AUTO-GENERATED. DO NOT EDIT DIRECTLY. -->
2+
3+
# Cloudflare Attributes
4+
5+
## cloudflare.d1.duration
6+
7+
The duration of a Cloudflare D1 operation.
8+
9+
| Property | Value |
10+
| --- | --- |
11+
| Type | `integer` |
12+
| Has PII | false |
13+
| Exists in OpenTelemetry | No |
14+
| Example | `543` |
15+
16+
## cloudflare.d1.rows_read
17+
18+
The number of rows read in a Cloudflare D1 operation.
19+
20+
| Property | Value |
21+
| --- | --- |
22+
| Type | `integer` |
23+
| Has PII | false |
24+
| Exists in OpenTelemetry | No |
25+
| Example | `12` |
26+
27+
## cloudflare.d1.rows_written
28+
29+
The number of rows written in a Cloudflare D1 operation.
30+
31+
| Property | Value |
32+
| --- | --- |
33+
| Type | `integer` |
34+
| Has PII | false |
35+
| Exists in OpenTelemetry | No |
36+
| Example | `12` |
37+

generated/attributes/code.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<!-- THIS FILE IS AUTO-GENERATED. DO NOT EDIT DIRECTLY. -->
2+
3+
# Code Attributes
4+
5+
## code.file.path
6+
7+
The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).
8+
9+
| Property | Value |
10+
| --- | --- |
11+
| Type | `string` |
12+
| Has PII | maybe |
13+
| Exists in OpenTelemetry | Yes |
14+
| Example | `/app/myapplication/http/handler/server.py` |
15+
| Aliases | `code.filepath` |
16+
17+
## code.filepath
18+
19+
The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).
20+
21+
| Property | Value |
22+
| --- | --- |
23+
| Type | `string` |
24+
| Has PII | maybe |
25+
| Exists in OpenTelemetry | Yes |
26+
| Example | `/app/myapplication/http/handler/server.py` |
27+
| Deprecated | Yes, use `code.file.path` instead |
28+
| Aliases | `code.file.path` |
29+
30+
## code.function
31+
32+
The method or function name, or equivalent (usually rightmost part of the code unit's name).
33+
34+
| Property | Value |
35+
| --- | --- |
36+
| Type | `string` |
37+
| Has PII | false |
38+
| Exists in OpenTelemetry | Yes |
39+
| Example | `server_request` |
40+
| Deprecated | Yes, use `code.function.name` instead |
41+
| Aliases | `code.function.name` |
42+
43+
## code.function.name
44+
45+
The method or function name, or equivalent (usually rightmost part of the code unit's name).
46+
47+
| Property | Value |
48+
| --- | --- |
49+
| Type | `string` |
50+
| Has PII | false |
51+
| Exists in OpenTelemetry | Yes |
52+
| Example | `server_request` |
53+
| Aliases | `code.function` |
54+
55+
## code.line.number
56+
57+
The line number in code.filepath best representing the operation. It SHOULD point within the code unit named in code.function
58+
59+
| Property | Value |
60+
| --- | --- |
61+
| Type | `integer` |
62+
| Has PII | false |
63+
| Exists in OpenTelemetry | Yes |
64+
| Example | `42` |
65+
| Aliases | `code.lineno` |
66+
67+
## code.lineno
68+
69+
The line number in code.filepath best representing the operation. It SHOULD point within the code unit named in code.function
70+
71+
| Property | Value |
72+
| --- | --- |
73+
| Type | `integer` |
74+
| Has PII | false |
75+
| Exists in OpenTelemetry | Yes |
76+
| Example | `42` |
77+
| Deprecated | Yes, use `code.line.number` instead |
78+
| Aliases | `code.lineno` |
79+
80+
## code.namespace
81+
82+
The 'namespace' within which code.function is defined. Usually the qualified class or module name, such that code.namespace + some separator + code.function form a unique identifier for the code unit.
83+
84+
| Property | Value |
85+
| --- | --- |
86+
| Type | `string` |
87+
| Has PII | false |
88+
| Exists in OpenTelemetry | Yes |
89+
| Example | `http.handler` |
90+
| Deprecated | Yes, use `code.function.name` instead |
91+
| Deprecation Reason | code.function.name should include the namespace. |
92+

0 commit comments

Comments
 (0)