Simplify metrics views#2515
Conversation
|
can we review this via meeting? |
|
|
||
| import io.opentelemetry.sdk.metrics.internal.view.AttributesProcessor; | ||
|
|
||
| public class ViewBuilderAccessor { |
There was a problem hiding this comment.
should we move this to standalone exporter module so that it can be reused?
There was a problem hiding this comment.
I realized, I think it's too early to use in the standalone exporter module, because AttributesProcessor is in an internal package, and we risk causing version conflicts for users if we use internal classes (which isn't the case in the javaagent since we have control of the SDK version used)
There was a problem hiding this comment.
are you going to propose to make AttributeProcessor public upstream in the future?
There was a problem hiding this comment.
added to this week's SIG meeting to discuss 👍
| import java.util.Set; | ||
|
|
||
| @SuppressWarnings("rawtypes") | ||
| enum MetricView { |
There was a problem hiding this comment.
same here. move it to standalone exporter module?
| private final Set<AttributeKey<?>> attributeKeys; | ||
| private final boolean includeSynthetic; | ||
|
|
||
| MetricView(String instrumentName, Set<AttributeKey<?>> attributeKeys, boolean includeSynthetic) { |
There was a problem hiding this comment.
| MetricView(String instrumentName, Set<AttributeKey<?>> attributeKeys, boolean includeSynthetic) { | |
| MetricView(String instrumentName, Set<AttributeKey<?>> attributeKeys, boolean hasSynthetic) { |
There was a problem hiding this comment.
renamed to captureSynthetic
|
|
||
| String connectionString = readableSpan.getAttribute(AiSemanticAttributes.CONNECTION_STRING); | ||
| if (connectionString != null) { | ||
| builder.put(AiSemanticAttributes.CONNECTION_STRING, connectionString); |
There was a problem hiding this comment.
why do we need this for pre-agg?
There was a problem hiding this comment.
so pre-aggs get reported to the correct connection string when connectionStringOverrides are used
There was a problem hiding this comment.
can we add a comment there mentioning connecitonStringOverrides?
| HTTP_CLIENT_VIEW("http.client.duration", httpClientDurationAttributeKeys(), false), | ||
| HTTP_SERVER_VIEW("http.server.duration", httpServerDurationAttributeKeys(), true), | ||
| RPC_CLIENT_VIEW("rpc.client.duration", rpcClientDurationAttributeKeys(), false), | ||
| RPC_SERVER_VIEW("rpc.server.duration", rpcServerDurationAttributeKeys(), false); |
There was a problem hiding this comment.
what about synthetic for rpc server?
There was a problem hiding this comment.
I realized that rpc instrumentation doesn't capture http.user_agent
No description provided.