-
Notifications
You must be signed in to change notification settings - Fork 34
OpenTelemetry migration. #629
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setup.py configuration to replace the dependency of OpenTracing with OpenTelemetry (OTel) and bump up to version 3.0.0. Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Disabled all tests that are not necessary in the beginning of the migration. Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
- Implement all the abstract methods provided by the OTel API - Adapt the existing code to OTel conventions. - Inherit OTel's SpanContext. - Comment out the usage of baggage. - Use time in nano seconds for start_time and end_time. - Initialization of Span's attributes, events, start_time, status, duration, and synthetic. - Add the duration, status, and parent_id properties. - Minor fixes to set values or get a dictionary value. Co-authored-by: Paulo Vital <paulo.vital@ibm.com> Signed-off-by: Varsha GS <varsha.gs@ibm.com>
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
…olations. Used ruff (vscode) to: - Black-compatible code formatting. - fix all auto-fixable violations, like unused imports. - isort-compatible import sorting. Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Co-authored-by: Varsha GS <varsha.gs@ibm.com> Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Used ruff (vscode) to: - Black-compatible code formatting. - fix all auto-fixable violations, like unused imports. - isort-compatible import sorting. Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Signed-off-by: Varsha GS <varsha.gs@ibm.com>
- contextmanager for start_as_current_span(). - use trace_flags.sampled instead of sampled. - Add Instana specific attributes to SpanContext. - Add parent Span_Context class arguments as necessary arguments to fix the serialization of binary objects. - Use format_span_id() for both representation of the trace_id and span_id since Instana uses 64-bit integers. Co-authored-by: Paulo Vital <paulo.vital@ibm.com> Signed-off-by: Varsha GS <varsha.gs@ibm.com>
- Refactor InstanaTracerProvider class for better performance. - Add the missing add_span_processor() method for InstanaTracerProvider. - Refactor InstanaTracer constructor removing all Optional arguments. - Fix the start_span() method to handle the root SpanContext properly. - Use TraceFlags as trace_flags arguments in new SpanContext objects. Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Following the OpenTelemetry API, guarantee Traces and Spans IDs are now 64-bit integers instead of strings. The data transmited to the Instana Agents or Backend are still 16HEXDIG strings. Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Disabled the load of the auto instrumentation for tests and the load of the instana package from the beginning of test execution. Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Adds a pytest.mark.skipif running on macOS to avoid the raise of a NotImplementedError when calling multiprocessing.Queue.qsize(). Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Used ruff (vscode) to: - Black-compatible code formatting. - fix all auto-fixable violations, like unused imports. - isort-compatible import sorting. Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Add new unit tests to check the implementation of the new TracerProvider and Tracer classed and their methods following OpenTelemetry API. Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Add type hints to methods and used ruff (vscode) to: - Black-compatible code formatting. - fix all auto-fixable violations, like unused imports. - isort-compatible import sorting. Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
…redSpan. Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
… OTel Signed-off-by: Varsha GS <varsha.gs@ibm.com>
Co-authored-by: Paulo Vital <paulo.vital@ibm.com> Signed-off-by: Varsha GS <varsha.gs@ibm.com>
Co-authored-by: Paulo Vital <paulo.vital@ibm.com> Signed-off-by: Varsha GS <varsha.gs@ibm.com>
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Adapt the code to record the Spans during the closing execution. Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Refactor the Instana's Span structure to improve performance and prevent potential issues. Declouped the BaseSpan, RegisteredSpan, and SDKSpan from the span.py file to prevent possible circular import errors. Moved all sequences with kind or types of spans to the kind.py file. Created the ReadableSpan class to provide read-only access to span attributes and information. Made the InstanaSpan to multiple inherit from OpenTelemetry's API Span and ReadableSpan classes. Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Signed-off-by: Varsha GS <varsha.gs@ibm.com>
Signed-off-by: Varsha GS <varsha.gs@ibm.com>
Signed-off-by: Varsha GS <varsha.gs@ibm.com>
Signed-off-by: Varsha GS <varsha.gs@ibm.com>
…` is `True` - skip instrumentation for unsupported versions Signed-off-by: Varsha GS <varsha.gs@ibm.com>
- with earlier code, it would fail even if `couchbase` does not have `__version__` - skip importing other modules if the package to be instrumented is not present Signed-off-by: Varsha GS <varsha.gs@ibm.com>
Signed-off-by: Varsha GS <varsha.gs@ibm.com>
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
GSVarsha
approved these changes
Sep 30, 2024
Contributor
GSVarsha
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks GREAT to me! 🎉
CagriYonca
approved these changes
Sep 30, 2024
Contributor
CagriYonca
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're opening the telemetry 🎉
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This tremendous PR results from an effort to change the dependency of the old and deprecated OpenTracing (TC) project in favor of OpenTelemetry (OTel).
Signed-off-by: Paulo Vital paulo.vital@ibm.com
Signed-off-by: Varsha GS varsha.gs@ibm.com
Signed-off-by: Cagri Yonca cagriyonca@gmail.com