-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathattributes.py
More file actions
8400 lines (7534 loc) · 288 KB
/
attributes.py
File metadata and controls
8400 lines (7534 loc) · 288 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
"""A collection of attribute names with helpers to retrieve an attribute's metadata, as defined in the Sentry Semantic Conventions registry."""
# This is an auto-generated file. Do not edit!
import warnings
from dataclasses import dataclass
from enum import Enum
from typing import Dict, List, Literal, Optional, TypedDict, Union
AttributeValue = Union[
str, int, float, bool, List[str], List[int], List[float], List[bool]
]
class AttributeType(Enum):
STRING = "string"
BOOLEAN = "boolean"
INTEGER = "integer"
DOUBLE = "double"
STRING_ARRAY = "string[]"
BOOLEAN_ARRAY = "boolean[]"
INTEGER_ARRAY = "integer[]"
DOUBLE_ARRAY = "double[]"
class IsPii(Enum):
TRUE = "true"
FALSE = "false"
MAYBE = "maybe"
@dataclass
class PiiInfo:
"""Holds information about PII in an attribute's values."""
isPii: IsPii
reason: Optional[str] = None
class DeprecationStatus(Enum):
BACKFILL = "backfill"
NORMALIZE = "normalize"
@dataclass
class DeprecationInfo:
"""Holds information about a deprecation."""
replacement: Optional[str] = None
reason: Optional[str] = None
status: Optional[DeprecationStatus] = None
@dataclass
class AttributeMetadata:
"""The metadata for an attribute."""
brief: str
"""A description of the attribute"""
type: AttributeType
"""The type of the attribute value"""
pii: PiiInfo
"""If an attribute can have pii. Is either true, false or maybe. Optionally include a reason about why it has PII or not"""
is_in_otel: bool
"""Whether the attribute is defined in OpenTelemetry Semantic Conventions"""
has_dynamic_suffix: Optional[bool] = None
"""If an attribute has a dynamic suffix, for example http.response.header.<key> where <key> is dynamic"""
example: Optional[AttributeValue] = None
"""An example value of the attribute"""
deprecation: Optional[DeprecationInfo] = None
"""If an attribute was deprecated, and what it was replaced with"""
aliases: Optional[List[str]] = None
"""If there are attributes that alias to this attribute"""
sdks: Optional[List[str]] = None
"""If an attribute is SDK specific, list the SDKs that use this attribute. This is not an exhaustive list, there might be SDKs that send this attribute that are is not documented here."""
class _AttributeNamesMeta(type):
_deprecated_names = {
"AI_COMPLETION_TOKENS_USED",
"AI_FINISH_REASON",
"AI_FREQUENCY_PENALTY",
"AI_FUNCTION_CALL",
"AI_GENERATION_ID",
"AI_INPUT_MESSAGES",
"AI_MODEL_PROVIDER",
"AI_MODEL_ID",
"AI_PIPELINE_NAME",
"AI_PRESENCE_PENALTY",
"AI_PROMPT_TOKENS_USED",
"AI_RESPONSES",
"AI_SEED",
"AI_STREAMING",
"AI_TEMPERATURE",
"AI_TOOL_CALLS",
"AI_TOOLS",
"AI_TOP_K",
"AI_TOP_P",
"AI_TOTAL_TOKENS_USED",
"CODE_FILEPATH",
"CODE_FUNCTION",
"CODE_LINENO",
"CODE_NAMESPACE",
"DB_NAME",
"DB_OPERATION",
"DB_SQL_BINDINGS",
"DB_STATEMENT",
"DB_SYSTEM",
"ENVIRONMENT",
"FS_ERROR",
"GEN_AI_PROMPT",
"GEN_AI_USAGE_COMPLETION_TOKENS",
"GEN_AI_USAGE_PROMPT_TOKENS",
"HTTP_CLIENT_IP",
"HTTP_FLAVOR",
"HTTP_HOST",
"HTTP_METHOD",
"HTTP_RESPONSE_CONTENT_LENGTH",
"HTTP_RESPONSE_TRANSFER_SIZE",
"HTTP_SCHEME",
"HTTP_SERVER_NAME",
"HTTP_STATUS_CODE",
"HTTP_TARGET",
"HTTP_URL",
"HTTP_USER_AGENT",
"METHOD",
"NET_HOST_IP",
"NET_HOST_NAME",
"NET_HOST_PORT",
"NET_PEER_IP",
"NET_PEER_NAME",
"NET_PEER_PORT",
"NET_PROTOCOL_NAME",
"NET_PROTOCOL_VERSION",
"NET_SOCK_FAMILY",
"NET_SOCK_HOST_ADDR",
"NET_SOCK_HOST_PORT",
"NET_SOCK_PEER_ADDR",
"NET_SOCK_PEER_NAME",
"NET_SOCK_PEER_PORT",
"NET_TRANSPORT",
"PROFILE_ID",
"QUERY_KEY",
"RELEASE",
"REPLAY_ID",
"RESOURCE_DEPLOYMENT_ENVIRONMENT_NAME",
"ROUTE",
"SENTRY_BROWSER_NAME",
"SENTRY_BROWSER_VERSION",
"_SENTRY_SEGMENT_ID",
"TRANSACTION",
"URL",
}
def __getattribute__(cls, name: str):
if name == "_deprecated_names":
return super().__getattribute__(name)
if name in cls._deprecated_names:
warnings.warn(
f"{cls.__name__}.{name} is deprecated.",
DeprecationWarning,
stacklevel=2,
)
return super().__getattribute__(name)
class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
"""Contains all attribute names as class attributes with their documentation."""
# Path: model/attributes/ai/ai__citations.json
AI_CITATIONS: Literal["ai.citations"] = "ai.citations"
"""References or sources cited by the AI model in its response.
Type: List[str]
Contains PII: true
Defined in OTEL: No
Example: ["Citation 1","Citation 2"]
"""
# Path: model/attributes/ai/ai__completion_tokens__used.json
AI_COMPLETION_TOKENS_USED: Literal["ai.completion_tokens.used"] = (
"ai.completion_tokens.used"
)
"""The number of tokens used to respond to the message.
Type: int
Contains PII: false
Defined in OTEL: No
Aliases: gen_ai.usage.output_tokens, gen_ai.usage.completion_tokens
DEPRECATED: Use gen_ai.usage.output_tokens instead
Example: 10
"""
# Path: model/attributes/ai/ai__documents.json
AI_DOCUMENTS: Literal["ai.documents"] = "ai.documents"
"""Documents or content chunks used as context for the AI model.
Type: List[str]
Contains PII: true
Defined in OTEL: No
Example: ["document1.txt","document2.pdf"]
"""
# Path: model/attributes/ai/ai__finish_reason.json
AI_FINISH_REASON: Literal["ai.finish_reason"] = "ai.finish_reason"
"""The reason why the model stopped generating.
Type: str
Contains PII: maybe
Defined in OTEL: No
Aliases: gen_ai.response.finish_reasons
DEPRECATED: Use gen_ai.response.finish_reason instead
Example: "COMPLETE"
"""
# Path: model/attributes/ai/ai__frequency_penalty.json
AI_FREQUENCY_PENALTY: Literal["ai.frequency_penalty"] = "ai.frequency_penalty"
"""Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.
Type: float
Contains PII: false
Defined in OTEL: No
Aliases: gen_ai.request.frequency_penalty
DEPRECATED: Use gen_ai.request.frequency_penalty instead
Example: 0.5
"""
# Path: model/attributes/ai/ai__function_call.json
AI_FUNCTION_CALL: Literal["ai.function_call"] = "ai.function_call"
"""For an AI model call, the function that was called. This is deprecated for OpenAI, and replaced by tool_calls
Type: str
Contains PII: true
Defined in OTEL: No
Aliases: gen_ai.tool.name
DEPRECATED: Use gen_ai.tool.name instead
Example: "function_name"
"""
# Path: model/attributes/ai/ai__generation_id.json
AI_GENERATION_ID: Literal["ai.generation_id"] = "ai.generation_id"
"""Unique identifier for the completion.
Type: str
Contains PII: maybe
Defined in OTEL: No
Aliases: gen_ai.response.id
DEPRECATED: Use gen_ai.response.id instead
Example: "gen_123abc"
"""
# Path: model/attributes/ai/ai__input_messages.json
AI_INPUT_MESSAGES: Literal["ai.input_messages"] = "ai.input_messages"
"""The input messages sent to the model
Type: str
Contains PII: maybe
Defined in OTEL: No
Aliases: gen_ai.request.messages
DEPRECATED: Use gen_ai.request.messages instead
Example: "[{\"role\": \"user\", \"message\": \"hello\"}]"
"""
# Path: model/attributes/ai/ai__is_search_required.json
AI_IS_SEARCH_REQUIRED: Literal["ai.is_search_required"] = "ai.is_search_required"
"""Boolean indicating if the model needs to perform a search.
Type: bool
Contains PII: false
Defined in OTEL: No
Example: false
"""
# Path: model/attributes/ai/ai__metadata.json
AI_METADATA: Literal["ai.metadata"] = "ai.metadata"
"""Extra metadata passed to an AI pipeline step.
Type: str
Contains PII: maybe
Defined in OTEL: No
Example: "{\"user_id\": 123, \"session_id\": \"abc123\"}"
"""
# Path: model/attributes/ai/ai__model__provider.json
AI_MODEL_PROVIDER: Literal["ai.model.provider"] = "ai.model.provider"
"""The provider of the model.
Type: str
Contains PII: maybe
Defined in OTEL: No
Aliases: gen_ai.system
DEPRECATED: Use gen_ai.system instead
Example: "openai"
"""
# Path: model/attributes/ai/ai__model_id.json
AI_MODEL_ID: Literal["ai.model_id"] = "ai.model_id"
"""The vendor-specific ID of the model used.
Type: str
Contains PII: maybe
Defined in OTEL: No
Aliases: gen_ai.response.model
DEPRECATED: Use gen_ai.response.model instead
Example: "gpt-4"
"""
# Path: model/attributes/ai/ai__pipeline__name.json
AI_PIPELINE_NAME: Literal["ai.pipeline.name"] = "ai.pipeline.name"
"""The name of the AI pipeline.
Type: str
Contains PII: maybe
Defined in OTEL: No
Aliases: gen_ai.pipeline.name
DEPRECATED: Use gen_ai.pipeline.name instead
Example: "Autofix Pipeline"
"""
# Path: model/attributes/ai/ai__preamble.json
AI_PREAMBLE: Literal["ai.preamble"] = "ai.preamble"
"""For an AI model call, the preamble parameter. Preambles are a part of the prompt used to adjust the model's overall behavior and conversation style.
Type: str
Contains PII: true
Defined in OTEL: No
Example: "You are now a clown."
"""
# Path: model/attributes/ai/ai__presence_penalty.json
AI_PRESENCE_PENALTY: Literal["ai.presence_penalty"] = "ai.presence_penalty"
"""Used to reduce repetitiveness of generated tokens. Similar to frequency_penalty, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.
Type: float
Contains PII: false
Defined in OTEL: No
Aliases: gen_ai.request.presence_penalty
DEPRECATED: Use gen_ai.request.presence_penalty instead
Example: 0.5
"""
# Path: model/attributes/ai/ai__prompt_tokens__used.json
AI_PROMPT_TOKENS_USED: Literal["ai.prompt_tokens.used"] = "ai.prompt_tokens.used"
"""The number of tokens used to process just the prompt.
Type: int
Contains PII: false
Defined in OTEL: No
Aliases: gen_ai.usage.prompt_tokens, gen_ai.usage.input_tokens
DEPRECATED: Use gen_ai.usage.input_tokens instead
Example: 20
"""
# Path: model/attributes/ai/ai__raw_prompting.json
AI_RAW_PROMPTING: Literal["ai.raw_prompting"] = "ai.raw_prompting"
"""When enabled, the user’s prompt will be sent to the model without any pre-processing.
Type: bool
Contains PII: false
Defined in OTEL: No
Example: true
"""
# Path: model/attributes/ai/ai__response_format.json
AI_RESPONSE_FORMAT: Literal["ai.response_format"] = "ai.response_format"
"""For an AI model call, the format of the response
Type: str
Contains PII: maybe
Defined in OTEL: No
Example: "json_object"
"""
# Path: model/attributes/ai/ai__responses.json
AI_RESPONSES: Literal["ai.responses"] = "ai.responses"
"""The response messages sent back by the AI model.
Type: List[str]
Contains PII: maybe
Defined in OTEL: No
DEPRECATED: Use gen_ai.response.text instead
Example: ["hello","world"]
"""
# Path: model/attributes/ai/ai__search_queries.json
AI_SEARCH_QUERIES: Literal["ai.search_queries"] = "ai.search_queries"
"""Queries used to search for relevant context or documents.
Type: List[str]
Contains PII: true
Defined in OTEL: No
Example: ["climate change effects","renewable energy"]
"""
# Path: model/attributes/ai/ai__search_results.json
AI_SEARCH_RESULTS: Literal["ai.search_results"] = "ai.search_results"
"""Results returned from search queries for context.
Type: List[str]
Contains PII: true
Defined in OTEL: No
Example: ["search_result_1, search_result_2"]
"""
# Path: model/attributes/ai/ai__seed.json
AI_SEED: Literal["ai.seed"] = "ai.seed"
"""The seed, ideally models given the same seed and same other parameters will produce the exact same output.
Type: str
Contains PII: maybe
Defined in OTEL: No
Aliases: gen_ai.request.seed
DEPRECATED: Use gen_ai.request.seed instead
Example: "1234567890"
"""
# Path: model/attributes/ai/ai__streaming.json
AI_STREAMING: Literal["ai.streaming"] = "ai.streaming"
"""Whether the request was streamed back.
Type: bool
Contains PII: false
Defined in OTEL: No
Aliases: gen_ai.response.streaming
DEPRECATED: Use gen_ai.response.streaming instead
Example: true
"""
# Path: model/attributes/ai/ai__tags.json
AI_TAGS: Literal["ai.tags"] = "ai.tags"
"""Tags that describe an AI pipeline step.
Type: str
Contains PII: maybe
Defined in OTEL: No
Example: "{\"executed_function\": \"add_integers\"}"
"""
# Path: model/attributes/ai/ai__temperature.json
AI_TEMPERATURE: Literal["ai.temperature"] = "ai.temperature"
"""For an AI model call, the temperature parameter. Temperature essentially means how random the output will be.
Type: float
Contains PII: false
Defined in OTEL: No
Aliases: gen_ai.request.temperature
DEPRECATED: Use gen_ai.request.temperature instead
Example: 0.1
"""
# Path: model/attributes/ai/ai__texts.json
AI_TEXTS: Literal["ai.texts"] = "ai.texts"
"""Raw text inputs provided to the model.
Type: List[str]
Contains PII: true
Defined in OTEL: No
Example: ["Hello, how are you?","What is the capital of France?"]
"""
# Path: model/attributes/ai/ai__tool_calls.json
AI_TOOL_CALLS: Literal["ai.tool_calls"] = "ai.tool_calls"
"""For an AI model call, the tool calls that were made.
Type: List[str]
Contains PII: true
Defined in OTEL: No
DEPRECATED: Use gen_ai.response.tool_calls instead
Example: ["tool_call_1","tool_call_2"]
"""
# Path: model/attributes/ai/ai__tools.json
AI_TOOLS: Literal["ai.tools"] = "ai.tools"
"""For an AI model call, the functions that are available
Type: List[str]
Contains PII: maybe
Defined in OTEL: No
DEPRECATED: Use gen_ai.request.available_tools instead
Example: ["function_1","function_2"]
"""
# Path: model/attributes/ai/ai__top_k.json
AI_TOP_K: Literal["ai.top_k"] = "ai.top_k"
"""Limits the model to only consider the K most likely next tokens, where K is an integer (e.g., top_k=20 means only the 20 highest probability tokens are considered).
Type: int
Contains PII: false
Defined in OTEL: No
Aliases: gen_ai.request.top_k
DEPRECATED: Use gen_ai.request.top_k instead
Example: 35
"""
# Path: model/attributes/ai/ai__top_p.json
AI_TOP_P: Literal["ai.top_p"] = "ai.top_p"
"""Limits the model to only consider tokens whose cumulative probability mass adds up to p, where p is a float between 0 and 1 (e.g., top_p=0.7 means only tokens that sum up to 70% of the probability mass are considered).
Type: float
Contains PII: false
Defined in OTEL: No
Aliases: gen_ai.request.top_p
DEPRECATED: Use gen_ai.request.top_p instead
Example: 0.7
"""
# Path: model/attributes/ai/ai__total_cost.json
AI_TOTAL_COST: Literal["ai.total_cost"] = "ai.total_cost"
"""The total cost for the tokens used.
Type: float
Contains PII: false
Defined in OTEL: No
Example: 12.34
"""
# Path: model/attributes/ai/ai__total_tokens__used.json
AI_TOTAL_TOKENS_USED: Literal["ai.total_tokens.used"] = "ai.total_tokens.used"
"""The total number of tokens used to process the prompt.
Type: int
Contains PII: false
Defined in OTEL: No
Aliases: gen_ai.usage.total_tokens
DEPRECATED: Use gen_ai.usage.total_tokens instead
Example: 30
"""
# Path: model/attributes/ai/ai__warnings.json
AI_WARNINGS: Literal["ai.warnings"] = "ai.warnings"
"""Warning messages generated during model execution.
Type: List[str]
Contains PII: true
Defined in OTEL: No
Example: ["Token limit exceeded"]
"""
# Path: model/attributes/app_start_type.json
APP_START_TYPE: Literal["app_start_type"] = "app_start_type"
"""Mobile app start variant. Either cold or warm.
Type: str
Contains PII: maybe
Defined in OTEL: No
Example: "cold"
"""
# Path: model/attributes/blocked_main_thread.json
BLOCKED_MAIN_THREAD: Literal["blocked_main_thread"] = "blocked_main_thread"
"""Whether the main thread was blocked by the span.
Type: bool
Contains PII: false
Defined in OTEL: No
Example: true
"""
# Path: model/attributes/browser/browser__name.json
BROWSER_NAME: Literal["browser.name"] = "browser.name"
"""The name of the browser.
Type: str
Contains PII: maybe
Defined in OTEL: No
Aliases: sentry.browser.name
Example: "Chrome"
"""
# Path: model/attributes/browser/browser__report__type.json
BROWSER_REPORT_TYPE: Literal["browser.report.type"] = "browser.report.type"
"""A browser report sent via reporting API..
Type: str
Contains PII: maybe
Defined in OTEL: No
Example: "network-error"
"""
# Path: model/attributes/browser/browser__script__invoker.json
BROWSER_SCRIPT_INVOKER: Literal["browser.script.invoker"] = "browser.script.invoker"
"""How a script was called in the browser.
Type: str
Contains PII: maybe
Defined in OTEL: No
Example: "Window.requestAnimationFrame"
"""
# Path: model/attributes/browser/browser__script__invoker_type.json
BROWSER_SCRIPT_INVOKER_TYPE: Literal["browser.script.invoker_type"] = (
"browser.script.invoker_type"
)
"""Browser script entry point type.
Type: str
Contains PII: maybe
Defined in OTEL: No
Example: "event-listener"
"""
# Path: model/attributes/browser/browser__script__source_char_position.json
BROWSER_SCRIPT_SOURCE_CHAR_POSITION: Literal[
"browser.script.source_char_position"
] = "browser.script.source_char_position"
"""A number representing the script character position of the script.
Type: int
Contains PII: false
Defined in OTEL: No
Example: 678
"""
# Path: model/attributes/browser/browser__version.json
BROWSER_VERSION: Literal["browser.version"] = "browser.version"
"""The version of the browser.
Type: str
Contains PII: maybe
Defined in OTEL: No
Aliases: sentry.browser.version
Example: "120.0.6099.130"
"""
# Path: model/attributes/cache/cache__hit.json
CACHE_HIT: Literal["cache.hit"] = "cache.hit"
"""If the cache was hit during this span.
Type: bool
Contains PII: false
Defined in OTEL: No
Example: true
"""
# Path: model/attributes/cache/cache__item_size.json
CACHE_ITEM_SIZE: Literal["cache.item_size"] = "cache.item_size"
"""The size of the requested item in the cache. In bytes.
Type: int
Contains PII: false
Defined in OTEL: No
Example: 58
"""
# Path: model/attributes/cache/cache__key.json
CACHE_KEY: Literal["cache.key"] = "cache.key"
"""The key of the cache accessed.
Type: List[str]
Contains PII: maybe
Defined in OTEL: No
Example: ["my-cache-key","my-other-cache-key"]
"""
# Path: model/attributes/cache/cache__operation.json
CACHE_OPERATION: Literal["cache.operation"] = "cache.operation"
"""The operation being performed on the cache.
Type: str
Contains PII: maybe
Defined in OTEL: No
Example: "get"
"""
# Path: model/attributes/cache/cache__ttl.json
CACHE_TTL: Literal["cache.ttl"] = "cache.ttl"
"""The ttl of the cache in seconds
Type: int
Contains PII: false
Defined in OTEL: No
Example: 120
"""
# Path: model/attributes/channel.json
CHANNEL: Literal["channel"] = "channel"
"""The channel name that is being used.
Type: str
Contains PII: maybe
Defined in OTEL: No
Example: "mail"
"""
# Path: model/attributes/client/client__address.json
CLIENT_ADDRESS: Literal["client.address"] = "client.address"
"""Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
Type: str
Contains PII: true
Defined in OTEL: Yes
Aliases: http.client_ip
Example: "example.com"
"""
# Path: model/attributes/client/client__port.json
CLIENT_PORT: Literal["client.port"] = "client.port"
"""Client port number.
Type: int
Contains PII: false
Defined in OTEL: Yes
Example: 5432
"""
# Path: model/attributes/cloudflare/cloudflare__d1__duration.json
CLOUDFLARE_D1_DURATION: Literal["cloudflare.d1.duration"] = "cloudflare.d1.duration"
"""The duration of a Cloudflare D1 operation.
Type: int
Contains PII: false
Defined in OTEL: No
Example: 543
"""
# Path: model/attributes/cloudflare/cloudflare__d1__rows_read.json
CLOUDFLARE_D1_ROWS_READ: Literal["cloudflare.d1.rows_read"] = (
"cloudflare.d1.rows_read"
)
"""The number of rows read in a Cloudflare D1 operation.
Type: int
Contains PII: false
Defined in OTEL: No
Example: 12
"""
# Path: model/attributes/cloudflare/cloudflare__d1__rows_written.json
CLOUDFLARE_D1_ROWS_WRITTEN: Literal["cloudflare.d1.rows_written"] = (
"cloudflare.d1.rows_written"
)
"""The number of rows written in a Cloudflare D1 operation.
Type: int
Contains PII: false
Defined in OTEL: No
Example: 12
"""
# Path: model/attributes/code/code__file__path.json
CODE_FILE_PATH: Literal["code.file.path"] = "code.file.path"
"""The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).
Type: str
Contains PII: maybe
Defined in OTEL: Yes
Aliases: code.filepath
Example: "/app/myapplication/http/handler/server.py"
"""
# Path: model/attributes/code/code__filepath.json
CODE_FILEPATH: Literal["code.filepath"] = "code.filepath"
"""The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).
Type: str
Contains PII: maybe
Defined in OTEL: Yes
Aliases: code.file.path
DEPRECATED: Use code.file.path instead
Example: "/app/myapplication/http/handler/server.py"
"""
# Path: model/attributes/code/code__function.json
CODE_FUNCTION: Literal["code.function"] = "code.function"
"""The method or function name, or equivalent (usually rightmost part of the code unit's name).
Type: str
Contains PII: maybe
Defined in OTEL: Yes
Aliases: code.function.name
DEPRECATED: Use code.function.name instead
Example: "server_request"
"""
# Path: model/attributes/code/code__function__name.json
CODE_FUNCTION_NAME: Literal["code.function.name"] = "code.function.name"
"""The method or function name, or equivalent (usually rightmost part of the code unit's name).
Type: str
Contains PII: maybe
Defined in OTEL: Yes
Aliases: code.function
Example: "server_request"
"""
# Path: model/attributes/code/code__line__number.json
CODE_LINE_NUMBER: Literal["code.line.number"] = "code.line.number"
"""The line number in code.filepath best representing the operation. It SHOULD point within the code unit named in code.function
Type: int
Contains PII: false
Defined in OTEL: Yes
Aliases: code.lineno
Example: 42
"""
# Path: model/attributes/code/code__lineno.json
CODE_LINENO: Literal["code.lineno"] = "code.lineno"
"""The line number in code.filepath best representing the operation. It SHOULD point within the code unit named in code.function
Type: int
Contains PII: false
Defined in OTEL: Yes
Aliases: code.line.number
DEPRECATED: Use code.line.number instead
Example: 42
"""
# Path: model/attributes/code/code__namespace.json
CODE_NAMESPACE: Literal["code.namespace"] = "code.namespace"
"""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.
Type: str
Contains PII: maybe
Defined in OTEL: Yes
DEPRECATED: Use code.function.name instead - code.function.name should include the namespace.
Example: "http.handler"
"""
# Path: model/attributes/db/db__collection__name.json
DB_COLLECTION_NAME: Literal["db.collection.name"] = "db.collection.name"
"""The name of a collection (table, container) within the database.
Type: str
Contains PII: maybe
Defined in OTEL: Yes
Example: "users"
"""
# Path: model/attributes/db/db__name.json
DB_NAME: Literal["db.name"] = "db.name"
"""The name of the database being accessed.
Type: str
Contains PII: maybe
Defined in OTEL: Yes
Aliases: db.namespace
DEPRECATED: Use db.namespace instead
Example: "customers"
"""
# Path: model/attributes/db/db__namespace.json
DB_NAMESPACE: Literal["db.namespace"] = "db.namespace"
"""The name of the database being accessed.
Type: str
Contains PII: maybe
Defined in OTEL: Yes
Aliases: db.name
Example: "customers"
"""
# Path: model/attributes/db/db__operation.json
DB_OPERATION: Literal["db.operation"] = "db.operation"
"""The name of the operation being executed.
Type: str
Contains PII: maybe
Defined in OTEL: Yes
Aliases: db.operation.name
DEPRECATED: Use db.operation.name instead
Example: "SELECT"
"""
# Path: model/attributes/db/db__operation__name.json
DB_OPERATION_NAME: Literal["db.operation.name"] = "db.operation.name"
"""The name of the operation being executed.
Type: str
Contains PII: maybe
Defined in OTEL: Yes
Aliases: db.operation
Example: "SELECT"
"""
# Path: model/attributes/db/db__query__parameter__[key].json
DB_QUERY_PARAMETER_KEY: Literal["db.query.parameter.<key>"] = (
"db.query.parameter.<key>"
)
"""A query parameter used in db.query.text, with <key> being the parameter name, and the attribute value being a string representation of the parameter value.
Type: str
Contains PII: maybe
Defined in OTEL: Yes
Has Dynamic Suffix: true
Example: "db.query.parameter.foo='123'"
"""
# Path: model/attributes/db/db__query__summary.json
DB_QUERY_SUMMARY: Literal["db.query.summary"] = "db.query.summary"
"""A database query being executed. Should be paramaterized. The full version of the query is in `db.query.text`.
Type: str
Contains PII: maybe
Defined in OTEL: Yes
Example: "SELECT * FROM users"
"""
# Path: model/attributes/db/db__query__text.json
DB_QUERY_TEXT: Literal["db.query.text"] = "db.query.text"
"""The database query being executed. Should be the full query, not a parameterized version. The parameterized version is in `db.query.summary`.
Type: str
Contains PII: maybe
Defined in OTEL: Yes
Aliases: db.statement
Example: "SELECT * FROM users"
"""
# Path: model/attributes/db/db__redis__connection.json
DB_REDIS_CONNECTION: Literal["db.redis.connection"] = "db.redis.connection"
"""The redis connection name.
Type: str
Contains PII: maybe
Defined in OTEL: No
Example: "my-redis-instance"
"""
# Path: model/attributes/db/db__redis__parameters.json
DB_REDIS_PARAMETERS: Literal["db.redis.parameters"] = "db.redis.parameters"
"""The array of command parameters given to a redis command.
Type: List[str]
Contains PII: maybe
Defined in OTEL: No
Example: ["test","*"]
"""
# Path: model/attributes/db/db__sql__bindings.json
DB_SQL_BINDINGS: Literal["db.sql.bindings"] = "db.sql.bindings"
"""The array of query bindings.
Type: List[str]
Contains PII: maybe
Defined in OTEL: No
DEPRECATED: Use db.query.parameter.<key> instead - Instead of adding every binding in the db.sql.bindings attribute, add them as individual entires with db.query.parameter.<key>.
Example: ["1","foo"]
"""
# Path: model/attributes/db/db__statement.json
DB_STATEMENT: Literal["db.statement"] = "db.statement"
"""The database statement being executed.
Type: str
Contains PII: maybe
Defined in OTEL: Yes
Aliases: db.query.text
DEPRECATED: Use db.query.text instead
Example: "SELECT * FROM users"
"""
# Path: model/attributes/db/db__system.json
DB_SYSTEM: Literal["db.system"] = "db.system"
"""An identifier for the database management system (DBMS) product being used. See [OpenTelemetry docs](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md#notes-and-well-known-identifiers-for-dbsystem) for a list of well-known identifiers.
Type: str
Contains PII: maybe
Defined in OTEL: Yes
Aliases: db.system.name
DEPRECATED: Use db.system.name instead
Example: "postgresql"
"""
# Path: model/attributes/db/db__system__name.json
DB_SYSTEM_NAME: Literal["db.system.name"] = "db.system.name"
"""An identifier for the database management system (DBMS) product being used. See [OpenTelemetry docs](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md#notes-and-well-known-identifiers-for-dbsystem) for a list of well-known identifiers.
Type: str
Contains PII: maybe
Defined in OTEL: Yes
Aliases: db.system
Example: "postgresql"
"""
# Path: model/attributes/db/db__user.json
DB_USER: Literal["db.user"] = "db.user"
"""The database user.
Type: str
Contains PII: true
Defined in OTEL: Yes
Example: "fancy_user"
"""
# Path: model/attributes/device/device__brand.json
DEVICE_BRAND: Literal["device.brand"] = "device.brand"
"""The brand of the device.
Type: str
Contains PII: maybe
Defined in OTEL: No