Skip to content
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

Allow explicit start/end timestamp for Span #24

Closed
carlosalberto opened this issue Mar 28, 2019 · 8 comments · Fixed by #571
Closed

Allow explicit start/end timestamp for Span #24

carlosalberto opened this issue Mar 28, 2019 · 8 comments · Fixed by #571
Assignees
Labels
Agreed Issues that the group agreed on.

Comments

@carlosalberto
Copy link
Contributor

In order to support a OT bridge, we need to support explicit, optional values for start/end timestamp.

@SergeyKanzhelev
Copy link
Member

In Open Census explicit start/end is only allowed for SpanData creation, not for a span. Overriding start and stop may result in inconsistent timing inside the span when start time is not aligned with message events and annotations inside it.

Would creation of SpanData work better for this scenario? Which scenarios would break and are those important for end users?

@carlosalberto
Copy link
Contributor Author

Overriding start and stop may result in inconsistent timing inside the span when start time is not aligned with message events and annotations inside it.

Correct, this is something the user has to take care of, in case he overrides that - sadly this is something we need to support, backwards-wise, for OT.

@SergeyKanzhelev
Copy link
Member

sadly this is something we need to support, backwards-wise, for OT.

We can support a scenario when you construct an entire SpanData postfactum. Without even creating the Span. And pass it to the exporter. See how we do it in C#: https://github.com/census-instrumentation/opencensus-csharp/blob/2e9f34e452b04831ce65b5894748f8045fef77da/src/OpenCensus.Collector.StackExchangeRedis/StackExchangeRedisCallsCollector.cs#L115-L127

What will be broken if above scenario is supported, when below scenario of time modifications is not?

@tsloughter
Copy link
Member

tsloughter commented Mar 28, 2019

I like the construct entire SpanData postfactum idea. I had been struggling with how to support span creation for the Elixir database library Ecto which simply pushes events and this would allow to do that without any hassle. It means you won't have the SpanData available to modify by the database client but I don't think this is an issue at least for the time being.

@bogdandrutu
Copy link
Member

I agree with @tsloughter and @SergeyKanzhelev. I think actually having the SpanData in the api, and on the Tracer have a "recordSpanData" (name can be better) makes more sense, because in case where we construct the Span from different events (source of data) api calls like addAnnotations (or log in OT) will have a wrong timestamp associated with that annotation/log (also if the implemenation of addAnnotation/log records extra informations like "threadid" with every log statement that will not be the correct threadid that recorded the event).

@SergeyKanzhelev
Copy link
Member

@carlosalberto
Copy link
Contributor Author

Not against using SpanData, but I'm wondering if that will mean putting too many implementation details in the API ;)

@bogdandrutu
Copy link
Member

Proposal: Try to see how SpanData + Report API would look like.

@tedsuo tedsuo added Agreed Issues that the group agreed on. and removed Action Required labels Apr 9, 2019
@tedsuo tedsuo closed this as completed Apr 9, 2019
jkwatson pushed a commit that referenced this issue Aug 7, 2020
* Removed URLEncoder

* Fixed typo

* Added URLDecoding

* Included comment for string replacement

* Added unit tests for special characters in span names

* Resolved URL decoding issues

* Moved url decoding to parseQueryMap and updated the corresponding unit tests

* Added a README file for zPage quickstart

* Add images for README

* Updated README

* Add frontend images

* Add backend images

* Added our design doc

* Added details on package

* Reworded a few lines

* Moved DESIGN.md to a docs folder and changed gradle config to implementation

* Changed wording regarding HttpServer requirement

* Added zpages folder under docs, resolved broken image links

* Resolved comments for the design md file

* Made a few wording changes

* Wrote a benchmark test for TracezSpanBuckets (#23)

* Scaffolded logic for basic benchmark tests

* Wrote benchmark tests for TracezSpanBuckets

* Updated README with benchmark tests

* Changed the wording slightly

* Updated README file (#25)

* Wrote benchmark tests for TracezDataAggregator (#24)

* Scaffolded logic for basic benchmark tests

* Wrote benchmark tests for TracezSpanBuckets

* Updated README with benchmark tests

* Changed the wording slightly

* Added a set of benchmark tests for TracezDataAggregator

* Modified README formatting

* Changed benchmark test to negate dead code elimination

* Added Javadocs to the TracezDataAggregator benchmark tests

* Removed benchmark results from README and added a param to the TracezDataAggregator benchmark tests

* Update sdk_extensions/zpages/src/jmh/java/io/opentelemetry/sdk/extensions/zpages/TracezDataAggregatorBenchmark.java

Co-authored-by: Anuraag Agrawal <[email protected]>

* Added multiple param values for TracezDataAggregatorBenchmark

Co-authored-by: Terry Wang <[email protected]>
Co-authored-by: Anuraag Agrawal <[email protected]>
jkwatson pushed a commit that referenced this issue Aug 12, 2020
* Removed URLEncoder

* Fixed typo

* Added URLDecoding

* Included comment for string replacement

* Added unit tests for special characters in span names

* Resolved URL decoding issues

* Moved url decoding to parseQueryMap and updated the corresponding unit tests

* Added a README file for zPage quickstart

* Add images for README

* Updated README

* Add frontend images

* Add backend images

* Added our design doc

* Added details on package

* Reworded a few lines

* Moved DESIGN.md to a docs folder and changed gradle config to implementation

* Changed wording regarding HttpServer requirement

* Added zpages folder under docs, resolved broken image links

* Resolved comments for the design md file

* Made a few wording changes

* Wrote a benchmark test for TracezSpanBuckets (#23)

* Scaffolded logic for basic benchmark tests

* Wrote benchmark tests for TracezSpanBuckets

* Updated README with benchmark tests

* Changed the wording slightly

* Updated README file (#25)

* Wrote benchmark tests for TracezDataAggregator (#24)

* Scaffolded logic for basic benchmark tests

* Wrote benchmark tests for TracezSpanBuckets

* Updated README with benchmark tests

* Changed the wording slightly

* Added a set of benchmark tests for TracezDataAggregator

* Modified README formatting

* Changed benchmark test to negate dead code elimination

* Added Javadocs to the TracezDataAggregator benchmark tests

* Removed benchmark results from README and added a param to the TracezDataAggregator benchmark tests

* Update sdk_extensions/zpages/src/jmh/java/io/opentelemetry/sdk/extensions/zpages/TracezDataAggregatorBenchmark.java

Co-authored-by: Anuraag Agrawal <[email protected]>

* Added multiple param values for TracezDataAggregatorBenchmark

* Changed TraceConfigz zPage form submit to use POST request

* Added requestMethod parameter to emitHtml, limited TraceConfig change on POST request only

* Removed duplicate parse function, added test for update on POST request only

* Added separate method for processing request

* Removed unnecessary error check in tests, used try resources for inputstream

Co-authored-by: williamhu99 <[email protected]>
Co-authored-by: William Hu <[email protected]>
Co-authored-by: Anuraag Agrawal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agreed Issues that the group agreed on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants