-
Notifications
You must be signed in to change notification settings - Fork 469
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
Appender-tracing and target #1683
Comments
Note that for events, |
I tried the below example, slightly modified from example, and can see that target is coming as "basic", "basic::foo", and "basic::foo::baz" respectively...
|
@lalitb Missing target is limiting the utility - please reconsider the priority for this item, and move it to beta, if possible. |
Had a quick look into the Java implementation - it's uses a ComponentRegistry to maintain loggers/meters/tracers, which internally uses ConcurrentHashMap for storage. Looking further how other languages are doing it, before finalizing on second approach. |
I am more inclined towards
|
I'd suggest to keep it as top level field itself. Putting into attributes means one has to iterate through the attributes to find the target. |
OpenTelemetry-Appender-Tracing is currently ignoring the
target
from the Metadata. It is stored as an attribute "log.target" when using experimental feature flag.target
fromtracing
is what OTel calls instrumentation scope's name. Hence, thetarget
should be stored as instrumentation_scope.name.Currently, the instrumentation_scope is hardcoded to be "opentelemetry-appender-tracing", which makes it less useful, as every
LogRecord
will have the same information, defeating the purpose of scope/target in OpenTelemetry.Suggested fixes:
target
it encounters. This would likely kill perf/throughput due to the need of a read or read+insert to a lock-protected-hashmap in the hotpath. This could be mitigated via thread-local hashmap, so the contention can be solved at the expense of more memory. (IIUC, OTel Java uses this approach, but not sure if they use thread-local optimization or not)target
as a special attribute_tracing.target
in the LogRecord. In the OTLP Exporter thread, specially treat "_tracing.target" and use that to construct instrumentation_scope_name. (and then do not export this special attribute). OTel .NET does something like this to avoid performance bottleneck: [OTLP] Export LogRecord.CategoryName as InstrumentationScope name opentelemetry-dotnet#4941The text was updated successfully, but these errors were encountered: