krzko / opentelemetry-shell

🚦 OpenTelemetry functions for shells
Apache License 2.0
66 stars 6 forks source link

Add support for setting span name #62

Closed clintonb closed 10 months ago

clintonb commented 10 months ago

Is your feature request related to a problem?

The span name is currently the second argument after a call to otel_trace_start_parent_span or otel_trace_start_child_span. This results in abnormally-named spans. For example, the code below would yield a span whose name is the SQLite query:

otel_trace_start_parent_span sqlite3 "SELECT 1;"

This wrong.

Describe the solution you'd like

Allow me to manually set the name of the span. Just as custom attributes can be set by defining custom_resource_attributes before calling the function, let me do the same with span_name.

Describe alternatives you've considered

N/A

Additional context

N/A