opentelemetry-python icon indicating copy to clipboard operation
opentelemetry-python copied to clipboard

Synchronize OpenTelemetry Python code examples between otel-python and otel.io

Open zhihali opened this issue 1 year ago • 0 comments

Is your feature request related to a problem?

no

Describe the solution you'd like

As discussed in the SIG meeting on July 25th(https://docs.google.com/document/d/1CIMGoIOZ-c3-igzbd6_Pnxx1SjAkjwqoYSUWxPY8XIs/edit), we need to implement a solution to ensure consistency between the OpenTelemetry Python code examples in our repository and the documentation on opentelemetry.io.

Current situation:

  • Python code examples exist in the OpenTelemetry Python repository
  • opentelemetry.io manually copies these examples for documentation
  • This process is prone to inconsistencies, especially during version updates. if the python repo have change which will lead to problem in example code, we can’t find it on time
  • Documentation may not reflect the latest changes or bug fixes in the code

Proposed solution: Implement a function or process that:

  1. Find a way to automatically syncs code examples from the Python repo to the documentation
  2. Ensures that examples in the documentation are always up-to-date
  3. Add testing of the code examples to catch any issues

Next steps:

  1. Research potential methods for automating this synchronization
  2. Open a corresponding issue in the opentelemetry.io repository, discuss the proposal with the community for feedback and improvements

This enhancement will improve the reliability of our documentation and reduce the manual effort required to keep code examples consistent across our ecosystem.

Related issues: #4078 #4001

/cc @emdneto @lzchen

Describe alternatives you've considered

No response

Additional Context

No response

Would you like to implement a fix?

Yes

zhihali avatar Jul 25 '24 21:07 zhihali