-
Notifications
You must be signed in to change notification settings - Fork 808
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
How to make metadata accessible #4725
Comments
As discussed offline I'd be in favor of Option 2, or maybe even including the data in |
Thank you marc. I really like the idea of adding it to package.json. Opened the first PR to add metadata this way here |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue was closed because it has been stale for 14 days with no activity. |
I am exploring ways to enhance our handling of metadata for instrumentations, aiming to streamline processes and boost efficiency.
Instrumentation (or OpenTelemetry component) metadata comprises static information about OpenTelemetry JS instrumentation (or other components) that is valuable for distributions, control planes, APMs, and similar tools.
We currently record the name and version for each instrumentation, which also serves as the scope name for the signals we emit
Although metadata is not recorded into signals, it can significantly enhance user experience and automate tasks when utilized by distributions, offering a smoother and more intuitive interface.
Metadata Examples
amqplib
messaging client for RabbitMQ"init()
returns. The instrumented package is the most user friendly name to show in documentation and UIs thus it is quite useful IMO."open-telemetry/opentelemetry-js-contrib"
,"open-telemetry/opentelemetry-js"
, or third party repos). It is currently found in thepackage.json
for each instrumentation.plugins/node/instrumentation-amqplib
. This info can potentially be extracted from the"homepage"
attribute inpackage.json
.and more info that we might need oneday...
Essentially, any information that might be useful for users to consume through various interfaces (documentation, README, UI, links, status) in its raw format
Usages
Here are a few practical applications of how this metadata can be effectively utilized:
README
s, docs, and any markdown file, where the content is auto generated based on this data. See auto-instrumentations-node README. The instrumentations list can be auto-generated, and include more info to the user, like the instrumentation description, instrumented package names and supported versions, as well as a link to the homepage. This can enhance the user experience of our contrib distribution users, which can also be leveraged by other third party distributions. Auto-generated text reduce mistakes, maintenance, promote consistent content and is less prone to get out of sync.Suggestion
I want to suggest aggregating the metadata to achieve the goals above. I can work on the relevant PRs to implement something if there is an agreement. I will start with just the info we already have available, and then introduce a script for the auto-instrumentations-node README auto-generation and enhancement. Additionally, I plan to utilize this data for the odigos distribution of js agent to auto-generate a Node.js section in the Odigos documentation and potentially report back instrumentation statuses to the Odigos control plane based on this data.
Some objectives to consider:
Options
init()
function for patched packages info.If we decide to proceed this way, we must address TypeScript compatibility issues across versions to ensure that adding new properties does not introduce complexity.
Consider omitting it from web components at the moment so not to increase bundle size.
node_modules
folder to extract this info from code, and remote users can git pull to the tag or make an http request to fetch the data when needed. See Collector metadata.yaml as an inspiration.Considerations
I think that once we come up with a good way to record this info, introducing it to existing components is a relatively simple technical task which I am up for doing.
I would appreciate your thoughts, concerns, suggestions or support, to help make this initiative a success!
The text was updated successfully, but these errors were encountered: