Comments (13)
This is likely to be relevant : dotnet/runtime#86966
from opentelemetry-dotnet.
@cijothomas that is mostly what we need. It is missing one thing we are considering but have not settled on as mandatory: capturing tags in the worker process and flowing back to the host. We would then add those tags to the host's Activity
before recording it.
Related For the original title of this issue, there is another use case for this: durable task.
Without getting into the implementation details of how durable orchestrations work, suffice it to say that we re-create the same activity multiple times and only want to record it when the orchestration completes. This is because the same orchestration instance is loaded in and out of the application multiple times through its life ("replayed"). Representing each replay as its own span is noisy a not usable from a customer standpoint. Today we use reflection to set the span ID each time we rehydrate the activity. We don't need to worry about manually persisting and rehydrating tags as the orchestration replay will naturally rehydrate those.
We can discuss this in a separate issue (or even in the dotnet repo?) if need be.
from opentelemetry-dotnet.
@cijothomas that is mostly what we need.
When you said this, did you meant dotnet/runtime#86966 is what you'll mostly need?
Yes, that issue is mostly what we need. It is only having a way to capture tags and propagate them back to the host that wouldn't be there. But as I said, we are not convinced we will even have a feature like that.
from opentelemetry-dotnet.
@trask @lmolkova @jviau @cijothomas
from opentelemetry-dotnet.
to add context: Java allows this with something like
// extract span context
SpanContext remote = SpanContext.createFromRemoteParent("<traceId>", "<spanId>", TraceFlags.getDefault(), null);
// create parent Context from SpanContext
io.opentelemetry.context.Context parent = io.opentelemetry.context.Context.root().with(Span.wrap(remote));
// now we can make it current and it'll become a parent to any spans created in it's scope
Scope scope = parent.makeCurrent();
Span child = tracer.spanBuilder("child").startSpan();
// do child work
child.end();
scope.close();
I.e. it allows to make remote span context to be current/active and act as an ambient parent to any child spans.
I don't think API spec explicitly mentions it should be possible, and it'd be great to create a spec issue to fix it.
from opentelemetry-dotnet.
There is nothing in the spec that allows to re-create a Span, reusing same SpanId as an existing span, right?
Even the java example -it does not look like spanid is re-used...
from opentelemetry-dotnet.
Java does not re-create span, it creates a current context that can be used a parent.
I.e. functions host will create a span, then context would flow to function worker, where span context can act as an ambient parent.
@RohitRanjanMS to confirm that re-creating full Activity with an existing span-id is not a requirement.
The requirement (based on my understanding) is to
- be able to create children from this ambient semi-activity represented with remote ActivityContext and nothing else
- potentially record attributes/events on this semi-activity and pass them back to the host (this is a future extensibility)
My understanding that it needs BCL work, but we'd like to hear otel-dotnet thoughts on this.
from opentelemetry-dotnet.
@cijothomas that is mostly what we need.
When you said this, did you meant dotnet/runtime#86966 is what you'll mostly need?
from opentelemetry-dotnet.
Then we can close this issue, as this issue is asking for "re-create Span with existing span id", which is infeasible, and won't be supported without backing spec first.
from opentelemetry-dotnet.
@cijothomas let me clarify: for functions that issue will work for us. For durable task, we do have a need to recreate the same span repeatedly. This framework follows a record -> replay system, so we are replaying customer actions back to them. Part of that involves setting up the same span for them to interact with during the replay.
from opentelemetry-dotnet.
For durable task, we do have a need to recreate the same span repeatedly.
Got it. This should be opened as a spec issue as well.
from opentelemetry-dotnet.
Where would we create this spec issue?
from opentelemetry-dotnet.
Before opening a feature request against this repo, consider whether the feature
should/could be implemented in the other OpenTelemetry client
libraries. If so, please open an issue on
opentelemetry-specification
first.
from opentelemetry-dotnet.
Related Issues (20)
- Rename SimpleExemplarReservoir to SimpleFixedSizeExemplarReservoir
- Semantic Convention not fully working HOT 2
- Should `RecordException(this Activity activity, Exception? ex, in TagList tags)` set the attributes `error.type` and `otel.status_code`? HOT 3
- Ability to add prefixes for exported metrics HOT 5
- Array tags have newline character when serialized HOT 3
- Thread leak in BatchLogRecordExportProcessor (and probably in all BatchExportProcessor) HOT 1
- AOT compiled app throws System.PlatformNotSupportedException HOT 15
- Why does Body field shows as attributes? HOT 12
- Migrate `/docs` content that is end-user facing to OpenTelemetry Website HOT 4
- Add stress tests with validation too
- Console Exporter use YAML by default HOT 7
- Add ActivitySource to SamplingParameters HOT 4
- HttpProtobuf protocol not working HOT 3
- How can I connect the output to Jaeger with AddOtlpExporter?
- Application Insights shows 400-499 response codes even though failed requests have been filtered in a processor HOT 2
- OTLP Exporter Default impl doesn't match docs HOT 4
- Guidance for instrumentation authors of libraries built upon other instrumented libraries
- Improve memory efficiency in Dispose
- [OTLP] Determine specific conditions to consider when retrying export without a response from server.
- Shared files are out of sync between `opentelemetry-dotnet` and `opentelemetry-dotnet-contrib`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opentelemetry-dotnet.