-
Notifications
You must be signed in to change notification settings - Fork 893
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
Add database resource specification #2916
Comments
@djaglowski I'm curious to hear your thoughts on this and get your take on the possible attributes that I've proposed above. |
I may be in the minority on this but I am very skeptical that any broad set of database technologies can share much of a metadata model without requiring an unreasonable number of caveats and disclaimers. The architectures don't quite line up, so the attributes won't line up either. There are enough similarities to make this attractive, but I would argue that the model will not generalize well, that the exercise of developing it will be unnecessarily problematic, and that the utility of the result will be low. In my opinion, we'd be better off defining a set of attributes per technology, each highly accurate to that one specific technology.
This is a great example of the type of problem I would expect to see many times over with the "unified" approach. Seemingly similar architectures quickly diverge when you get into the details. The model becomes less useful as you add more technologies, because you end up having to add more and more caveats and special accommodations. All that said, I don't want to stand in the way if others in the community want to pursue this approach. My suggestion then would be to work through a reasonable cross section of databases and the architectural elements we may wish to represent in a unified model.
We don't have to pin everything out up front, but I think we should prove to ourselves that this approach is tractable. To me, that means we can do the following:
What is primarily important in my opinion is the degree to which we find ourselves trying to fit square pegs into round holes. This should help clarify the extent to which a unified model may be useful.
|
What are you trying to achieve?
Add a database resource specification for attributes that are consistent and identifying across all database receivers in the collector.
Additional context.
We (Sumo Logic) are looking to create contrib and spec issues to propose adding resource attribute(s) to
mysqlreceiver
, please see resource_attributes. Specifically, a human-friendly identifier of the database to be used for filtering etc. Tracing usesdb.name
, but it has a caveat: “In some SQL databases, the database name to be used is called “schema name”. In case there are multiple layers that could be considered for database name (e.g. Oracle instance name and schema name), the database name to be used is the more specific layer (e.g. Oracle schema name)“. I suspect this is fine in the case of MySQL, since “In MySQL, physically, a schema is synonymous with a database”. This exploration lead to the realization that there's a need for a database resource specification.Related
mysqlreceiver
metrics effort.Possible Database Resource Attributes
Considering the following attributes at this time:
db.cluster.name
Name of the database cluster (configured manually by the user), it serves as a human-friendly database identifier.
db.cluster.address
Network address used by end users to connect to the database. There can be several addresses used to connect to a single database and they may be different than the address used to collect metrics. Tracing has
net.peer.addr
, but this attribute doesn’t make much sense in the metrics context.db.cluster.port
Network port used by end users to connect to the database. Tracing has
net.peer.port
, but this attribute doesn’t make much sense in the metrics context.Current Concerns
Prometheus Exporter
Raised by @jsuereth:
Specification of export of resource attributes: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md#resource-attributes-1
Implications:
The text was updated successfully, but these errors were encountered: