-
Notifications
You must be signed in to change notification settings - Fork 303
telemetry: Reduce cardinality of some otel span names #3558
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -159,14 +159,16 @@ impl<C: Client> v3::HostConnectionWithStore for MysqlFactorData<C> { | |
| impl<C: Client> v2::Host for InstanceState<C> {} | ||
|
|
||
| impl<C: Client> v2::HostConnection for InstanceState<C> { | ||
| #[instrument(name = "spin_outbound_mysql.open", skip(self, address), err(level = Level::INFO), fields(otel.kind = "client", db.system = "mysql", db.address = Empty, server.port = Empty, db.namespace = Empty))] | ||
| #[instrument(name = "spin_outbound_mysql.open", skip(self, address), err(level = Level::INFO), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: shouldn't we use
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That sounds fine but I don't really want to audit all arguments in this PR. |
||
| fields(otel.kind = "client", db.system = "mysql", db.address = Empty, server.port = Empty, db.namespace = Empty))] | ||
| async fn open(&mut self, address: String) -> Result<Resource<v2::Connection>, v2::Error> { | ||
| let mut state = self.0.lock().await; | ||
| state.otel.reparent_tracing_span(); | ||
| state.open_connection(&address).await.map(Resource::new_own) | ||
| } | ||
|
|
||
| #[instrument(name = "spin_outbound_mysql.execute", skip(self, connection, params), err(level = Level::INFO), fields(otel.kind = "client", db.system = "mysql", otel.name = statement))] | ||
| #[instrument(name = "spin_outbound_mysql.execute", skip(self, connection, params), err(level = Level::INFO), | ||
| fields(otel.kind = "client", db.system = "mysql"))] | ||
| async fn execute( | ||
| &mut self, | ||
| connection: Resource<v2::Connection>, | ||
|
|
@@ -184,7 +186,8 @@ impl<C: Client> v2::HostConnection for InstanceState<C> { | |
| .map_err(track_db_error_on_span) | ||
| } | ||
|
|
||
| #[instrument(name = "spin_outbound_mysql.query", skip(self, connection, params), err(level = Level::INFO), fields(otel.kind = "client", db.system = "mysql", otel.name = statement))] | ||
| #[instrument(name = "spin_outbound_mysql.query", skip(self, connection, params), err(level = Level::INFO), | ||
| fields(otel.kind = "client", db.system = "mysql"))] | ||
| async fn query( | ||
|
lann marked this conversation as resolved.
|
||
| &mut self, | ||
| connection: Resource<v2::Connection>, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved topic here (per otel semantic conventions)