Closed Bug 1923143 Opened 1 year ago Closed 1 year ago

Create an OpenTelemetry C++-based tracing component

Categories

(Toolkit :: Gecko Trace, task)

task

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: michael, Assigned: michael)

References

(Blocks 1 open bug)

Details

(Keywords: perf-alert)

Attachments

(3 files, 1 obsolete file)

Monitoring error failures in Firefox calls for a comprehensive tracing system. Developing a custom error tracer risks inefficiently using developer resources and potentially duplicating established, approved solutions. Additionally, without integrating a comprehensive tracing system, we risk creating redundant systems and hindering the progress of overall observability within Firefox.

Objective

The objective of this bug is to implement an OpenTelemetry-based tracing component within Gecko, providing an API for the instrumentation of other components.

This new component will enable us to address diverse observability needs across various components and thread/process boundaries. Below are some features that Gecko developers may find beneficial:

  • Obtaining a view of commonly hard-to-debug error paths from real clients
  • Tracing operations across threads and IPC boundaries
  • Attaching tracing information to track the state and execution of runnables
  • Observing the resolution and callbacks of promises

Why Logging Falls Short: While logging is useful for recording discrete events or errors, it lacks the structured context necessary for tracing complex, multi-threaded operations across various boundaries. Logs provide snapshots rather than the continuous, contextualized view that tracing enables, which is crucial for debugging asynchronous issues and understanding system-wide interactions.

This bug tracks the first milestone of the Error Tracing Proposal for Firefox.

Assignee: nobody → mvanstraten
Status: NEW → ASSIGNED
Attachment #9429568 - Attachment description: Bug 1923143 part 2 - Patch opentelemetry-cpp with mozbuild files → WIP: Bug 1923143 part 2 - Patch opentelemetry-cpp with mozbuild files
Attachment #9429569 - Attachment description: Bug 1923143 part 3 - Add a OpenTelemetry C++ based tracing component → WIP: Bug 1923143 part 3 - Add a OpenTelemetry C++ based tracing component

Can you explain which problem this is intending to solve, and why what we already have in place (telemetry, logging, profiling) is not usable to solve it?

Flags: needinfo?(mvanstraten)

Sorry for the confusion, this bug is part of an internal project of the LWS DOM team.

Flags: needinfo?(mvanstraten)
Summary: Implement a OpenTelemetry C++ based tracing solution → WIP: Implement a OpenTelemetry C++ based tracing solution
Summary: WIP: Implement a OpenTelemetry C++ based tracing solution → PoC: Implement a OpenTelemetry C++ based tracing solution
Attachment #9429567 - Attachment description: Bug 1923143 part 1 - Vendor opentelemety-cpp library → WIP: Bug 1923143 part 1 - Vendor opentelemety-cpp library
Summary: PoC: Implement a OpenTelemetry C++ based tracing solution → Implement a OpenTelemetry C++ based tracing solution
Blocks: 1741408
No longer blocks: 1889347
Attachment #9429567 - Attachment description: WIP: Bug 1923143 part 1 - Vendor opentelemety-cpp library → Bug 1923143 part 1 - Vendor opentelemety-cpp library
Attachment #9429568 - Attachment description: WIP: Bug 1923143 part 2 - Patch opentelemetry-cpp with mozbuild files → Bug 1923143 part 2 - Patch opentelemetry-cpp with mozbuild files
Attachment #9429569 - Attachment description: WIP: Bug 1923143 part 3 - Add a OpenTelemetry C++ based tracing component → Bug 1923143 part 3 - Add a OpenTelemetry C++ based tracing component

Please consider using a different bugzilla component for this.

Flags: needinfo?(mvanstraten)

I've just created a request for a new bug component (Bug 1930663).

Flags: needinfo?(mvanstraten)

Thanks

Depends on: 1930663
Component: Storage: Quota Manager → Gecko Trace
Product: Core → Toolkit
Blocks: 1930954

I'm doing something that will give functionality similar to this in bug 1919845

See Also: → 1919845

(In reply to Jeff Muizelaar [:jrmuizel] from comment #10)

I'm doing something that will give functionality similar to this in bug 1919845

I see that this is scoped a bit broader than bug 1919845, with support for operations outside the profiler sampling context.

If you're interested in collaborating on this, please feel free to reach out. I'd be happy to discuss further.

Attachment #9429567 - Attachment description: Bug 1923143 part 1 - Vendor opentelemety-cpp library → WIP: Bug 1923143 part 1 - Vendor opentelemety-cpp library
Attachment #9429568 - Attachment description: Bug 1923143 part 2 - Patch opentelemetry-cpp with mozbuild files → WIP: Bug 1923143 part 2 - Patch opentelemetry-cpp with mozbuild files
Attachment #9429569 - Attachment description: Bug 1923143 part 3 - Add a OpenTelemetry C++ based tracing component → WIP: Bug 1923143 part 3 - Add a OpenTelemetry C++ based tracing component
Attachment #9429568 - Attachment description: WIP: Bug 1923143 part 2 - Patch opentelemetry-cpp with mozbuild files → Bug 1923143 part 2 - Patch opentelemetry-cpp with mozbuild files
Attachment #9429569 - Attachment description: WIP: Bug 1923143 part 3 - Add a OpenTelemetry C++ based tracing component → Bug 1923143 part 3 - Add a OpenTelemetry C++ based tracing component
Attachment #9429567 - Attachment description: WIP: Bug 1923143 part 1 - Vendor opentelemety-cpp library → Bug 1923143 part 1 - Vendor opentelemety-cpp library
Attachment #9429567 - Attachment description: Bug 1923143 part 1 - Vendor opentelemety-cpp library → WIP: Bug 1923143 part 1 - Vendor opentelemety-cpp library
Attachment #9429568 - Attachment description: Bug 1923143 part 2 - Patch opentelemetry-cpp with mozbuild files → WIP: Bug 1923143 part 2 - Patch opentelemetry-cpp with mozbuild files
Attachment #9429569 - Attachment description: Bug 1923143 part 3 - Add a OpenTelemetry C++ based tracing component → WIP: Bug 1923143 part 3 - Add a OpenTelemetry C++ based tracing component
Attachment #9429567 - Attachment description: WIP: Bug 1923143 part 1 - Vendor opentelemety-cpp library → Bug 1923143 part 1 - Vendor opentelemety-cpp library
Attachment #9429568 - Attachment description: WIP: Bug 1923143 part 2 - Patch opentelemetry-cpp with mozbuild files → Bug 1923143 part 2 - Patch opentelemetry-cpp with mozbuild files
Attachment #9429569 - Attachment description: WIP: Bug 1923143 part 3 - Add a OpenTelemetry C++ based tracing component → Bug 1923143 part 3 - Add a OpenTelemetry C++ based tracing component
Pushed by mvanstraten@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fb3772f8a616 part 1 - Vendor opentelemety-cpp library r=jari,nika https://hg.mozilla.org/integration/autoland/rev/45e612b7d4b6 part 2 - Patch opentelemetry-cpp with mozbuild files r=jari,nika https://hg.mozilla.org/integration/autoland/rev/7510845c07da part 3 - Add a OpenTelemetry C++ based tracing component r=jari,nika

Backed out for causing hazard bustages

Exception: Process executed with non-0 exit code 1: /builds/worker/checkouts/gecko/js/src/devtools/rootAnalysis/analyze.py --js /builds/worker/workspace/obj-haz-shell/dist/bin/js
Flags: needinfo?(mvanstraten)
Regressions: 1937780
Regressions: 1937781

(In reply to amarc from comment #13)

Backed out for causing hazard bustages

Exception: Process executed with non-0 exit code 1: /builds/worker/checkouts/gecko/js/src/devtools/rootAnalysis/analyze.py --js /builds/worker/workspace/obj-haz-shell/dist/bin/js

Perfherder has detected a build_metrics performance change from push 20c9e4dea27103afdae102935cd0ed9815151f56.

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
3% compiler_metrics num_static_constructors linux64 112.00 -> 109.00

Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.

If you need the profiling jobs you can trigger them yourself from treeherder job view or ask a sheriff to do that for you.

You can run these tests on try with ./mach try perf --alert 43126

For more information on performance sheriffing please see our FAQ.

Keywords: perf-alert

Apologies for the delay.

The issue was caused by a header file that forward-declared a class and then used that forward declaration in an std::shared_ptr. However, the header file that actually defines the class was never included in the build process. As a result, the analysis failed because it could not guarantee that the class had a non-deleted destructor.

This issue has been resolved by removing the forward declaration. To verify the fix, here is a try job:
Try Job Link

Flags: needinfo?(mvanstraten)
Pushed by mvanstraten@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3d3d9f95e477 part 1 - Vendor opentelemety-cpp library r=jari,nika https://hg.mozilla.org/integration/autoland/rev/02a5f49f0b2f part 2 - Patch opentelemetry-cpp with mozbuild files r=jari,nika https://hg.mozilla.org/integration/autoland/rev/1ec7a7034971 part 3 - Add a OpenTelemetry C++ based tracing component r=jari,nika
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
Regressions: 1944646
Regressions: 1944854
Blocks: 1950559
Summary: Implement a OpenTelemetry C++ based tracing solution → Create an OpenTelemetry C++-based tracing component
No longer blocks: 1741408, 1930954
Attachment #9437066 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: