census-instrumentation / opencensus-csharp

Distributed tracing and stats collecting framework
https://opencensus.io
Apache License 2.0
139 stars 32 forks source link

AttributeValue should allow to determine value type #58

Closed lmolkova closed 5 years ago

lmolkova commented 5 years ago

Check ocagent exporter: it has to convert any attribute to string because there is no way to check value type: https://github.com/census-instrumentation/opencensus-csharp/blob/bb372cc5bb0d6f5f448ebeceaaf4cb54cff3291f/src/OpenCensus.Exporter.Ocagent/Implementation/SpanDataExtentions.cs#L95

Check how it's done for protobuf oneof case: https://github.com/Microsoft/ApplicationInsights-LocalForwarder/blob/master/src/Library/OpenCensusTelemetryConverter.cs#L527

miknoj commented 5 years ago

Hi, I would like to work this issue no else is doing so. However, I do have a clarifying question. As for the type value you mean the generic type of OpenCensus.Trace.IAttributeValue, not Opencensus.Proto.Trace.V1.AttributeValue right?

lmolkova commented 5 years ago

Yes, you are right OpenCensus.Trace.IAttributeValue is the problematic one.

Nobody should be working on it. Thanks!

SergeyKanzhelev commented 5 years ago

@miknoj do you need any help with this?

miknoj commented 5 years ago

Hey @SergeyKanzhelev, I actually got busy right about the time I picked this issue... up so haven't had a chance to give this an honest attempt yet. I hope to give this an honest try this weekend and reach out if I run into any roadblocks.

SergeyKanzhelev commented 5 years ago

Perhaps what I suggested in PR may be a better fix for this issue

SergeyKanzhelev commented 5 years ago

Suggested PR addresses this issue.