-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from kubeshop/selector-semantic-convention-list
Create SelectorDefaultAttributes.ts
- Loading branch information
Showing
1 changed file
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
// JSON sructure to be used when auto generating selectors for a span. | ||
// Semantic groups are named based on the filenames of each group | ||
// as shown at https://github.com/open-telemetry/opentelemetry-specification/tree/main/semantic_conventions/trace | ||
// | ||
// All attributes listed below for a particular group should be checked for existence in | ||
// the selected span that we want to autogenerate the selectors array for. Create a SelectorItem | ||
// for each attribute that you find a value for in that selected span. | ||
|
||
// Note - need to add the following: | ||
// lamda - aws lambda section | ||
// aws-sdk - aws sdk section | ||
|
||
|
||
export const SELECTOR_DEFAULT_ATTRIBUTES = [ | ||
{ | ||
semanticGroup: 'http', | ||
attributes: [ | ||
'service.name', | ||
'http.target', | ||
'http.method', | ||
] | ||
}, | ||
{ | ||
semanticGroup: 'database', | ||
attributes: [ | ||
'service.name', | ||
'db.system', | ||
'db.name', | ||
'db.user', | ||
'db.operation', | ||
'db.redis.database_index', | ||
'db.mongodb.collection', | ||
'db.sql.table', | ||
'db.cassandra.table' | ||
] | ||
}, | ||
{ | ||
semanticGroup: 'rpc', | ||
attributes: [ | ||
'service.name', | ||
'rpc.system', | ||
'rpc.service', | ||
'rpc.method', | ||
'message.type' | ||
] | ||
}, | ||
{ | ||
semanticGroup: 'messaging', | ||
attributes: [ | ||
'service.name', | ||
'messaging.system', | ||
'messaging.destination', | ||
'messaging.destination_kind', | ||
'messaging.operation', | ||
'messaging.rabbitmq.routing_key', | ||
'messaging.kafka.consumer_group', | ||
'messaging.rocketmq.namespace', | ||
'messaging.rocketmq.client_group', | ||
'messaging.rocketmq.message_type', | ||
'messaging.rocketmq.message_keys', | ||
'messaging.rocketmq.consumption_model' | ||
] | ||
}, | ||
{ | ||
semanticGroup: 'faas', | ||
attributes: [ | ||
'service.name', | ||
'faas.invoked_name', | ||
'faas.invoked_provider', | ||
'faas.trigger', | ||
'faas.trigger', | ||
] | ||
}, | ||
{ | ||
semanticGroup: 'exception', | ||
attributes: [ | ||
'service.name', | ||
'exception.type', | ||
'exception.message', | ||
'exception.escaped', | ||
] | ||
}, | ||
{ | ||
semanticGroup: 'compatibility', | ||
attributes: [ | ||
'service.name', | ||
'opentracing.ref_type', | ||
] | ||
}, | ||
{ | ||
semanticGroup: 'general', | ||
attributes: [ | ||
'service.name', | ||
'enduser.id', | ||
'enduser.role', | ||
'enduser.scope', | ||
'thread.name', | ||
'code.function', | ||
'code.namespace', | ||
'code.filepath', | ||
] | ||
} | ||
] | ||
|