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

Make the demo repo fork friendlier #1405

Open
puckpuck opened this issue Feb 22, 2024 · 1 comment
Open

Make the demo repo fork friendlier #1405

puckpuck opened this issue Feb 22, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@puckpuck
Copy link
Contributor

The OpenTelemetry demo has 3 stated goals:

  • Provide a realistic example of a distributed system that can be used to demonstrate OpenTelemetry instrumentation and observability.
  • Build a base for vendors, tooling authors, and others to extend and demonstrate their OpenTelemetry integrations.
  • Create a living example for OpenTelemetry contributors to use for testing new versions of the API, SDK, and other components or enhancements.

The second goal, building a base for vendors and tooling authors to expand and showcase their capabilities, relies heavily on forking this repository and modifying the fork with long-standing modifications without the intent to upstream the changes.

In its current state, this repository offers only a few areas for forks to add modifications while still being able to maintain sync with the base repo. Fork-friendly for the OpenTelemetry demo would mean separating aspects of the services' logic, so forks can add modifications freely without merging the modified files when syncing upstream.

Separating the request handling from business logic for each service can aid this effort. One code file provides an entry point into the service for request handling. Other code file(s) are used to host the business logic, which is called by the request handlers. Forks would be expected to modify the smaller and more succinct business logic code files. Some services like the checkout service, have multiple business logic functions, which could be broken down into multiple logical files.

@puckpuck puckpuck added the enhancement New feature or request label Feb 22, 2024
@puckpuck
Copy link
Contributor Author

Another idea is to specify pre, start, end, and post hooks for each business logic function. The hooks are implemented using empty functions in a separate code file meant to be implemented by forks.

pre - before the span is created/started for business logic
start - after the span is started but before any business logic is run
end - before the span is ended but after all business logic is run
post - after the span is ended

Not all services and business logic areas can implement all 4 of the above hooks, but they should be able to do a start/end or pre/post set of hooks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant