Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
4fdab72
Update opentelemetry-operations-collector submodule to v0.147.0
rafaelwestphal Mar 9, 2026
2991ff7
Bump Go versions in CI config and integration tests to 1.25
rafaelwestphal Mar 9, 2026
a46a1e0
Bump Go version in Docker templates to 1.25.0
rafaelwestphal Mar 9, 2026
c8e7cac
Revert Go version bump in integration tests
rafaelwestphal Mar 9, 2026
64d1362
Merge branch 'master' into update-otelopscol-version
rafaelwestphal Mar 9, 2026
13fedd5
[confgenerator ] Set `block_on_overflow` and exporter batching in Ote…
franciscovalentecastro Mar 9, 2026
8e75584
Merge branch 'master' into update-otelopscol-version
rafaelwestphal Mar 10, 2026
f2787a6
Merge branch 'master' into update-otelopscol-version
rafaelwestphal Mar 10, 2026
9e3b36f
Fix transformation tests stacktrace golden file shift by forcing GOTO…
rafaelwestphal Mar 11, 2026
a23490a
Refactor setting GOTOOLCHAIN=local via templates
rafaelwestphal Mar 11, 2026
24a980c
Remove redundant GOTOOLCHAIN=local from pr_presubmit.yaml
rafaelwestphal Mar 11, 2026
e1a3503
Cleanup trailing blank lines in pr_presubmit.yaml
rafaelwestphal Mar 11, 2026
fb32cf6
Merge branch 'master' into update-otelopscol-version
rafaelwestphal Mar 11, 2026
8f04920
Update self-metric change
rafaelwestphal Mar 12, 2026
4e74d03
Fixing golde
rafaelwestphal Mar 12, 2026
75006ce
Removing troolchain hack
rafaelwestphal Mar 12, 2026
ccefe8a
Removing rogue new line
rafaelwestphal Mar 12, 2026
333c429
Fixing status code values
rafaelwestphal Mar 12, 2026
2c378ef
Fix lint
rafaelwestphal Mar 12, 2026
feffed7
Merge branch 'master' into update-otelopscol-version
rafaelwestphal Mar 12, 2026
0da4745
Fixing golden value
rafaelwestphal Mar 12, 2026
2da1c82
Fix golden
rafaelwestphal Mar 13, 2026
e828c87
Merge branch 'master' into update-otelopscol-version
rafaelwestphal Mar 13, 2026
6126d85
Using submodulo to test fix
rafaelwestphal Mar 17, 2026
c2330a1
Test using local go bin version
rafaelwestphal Mar 20, 2026
c1d7f29
Merge branch 'master' into update-otelopscol-version
rafaelwestphal Mar 20, 2026
74c1b3f
Fixng loggin requets_count metric
rafaelwestphal Mar 20, 2026
bda3e60
Updating transofmration test goldfen
rafaelwestphal Mar 20, 2026
16d614e
Fixing compilatipon wprolbm
rafaelwestphal Mar 20, 2026
46a8101
Fixing windows dockerfile
rafaelwestphal Mar 23, 2026
0af35c6
Fixing sefl-metric test
rafaelwestphal Mar 24, 2026
d36ba8d
Merge branch 'master' into update-otelopscol-version
rafaelwestphal Mar 24, 2026
980e771
Fixing self-metric dots to underscore
rafaelwestphal Mar 25, 2026
d4155e4
Merge branch 'master' into update-otelopscol-version
rafaelwestphal Mar 25, 2026
9de796f
Fixing point count metric name
rafaelwestphal Mar 25, 2026
edccf7c
Merge branch 'master' into update-otelopscol-version
rafaelwestphal Mar 25, 2026
0dfc725
Merge branch 'master' into update-otelopscol-version
rafaelwestphal Mar 26, 2026
733b3db
Pointing operations-collector to master commit
rafaelwestphal Mar 26, 2026
47baefe
Fixing bug with self-metric
rafaelwestphal Mar 30, 2026
6d78ca9
Merge branch 'master' into update-otelopscol-version
rafaelwestphal Mar 31, 2026
ddae4ae
Fixing windows event log issue
rafaelwestphal Mar 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/pr_presubmit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: 1.24.x
go-version: 1.25.x
cache: true

- id: files
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ARG CMAKE_VERSION=3.25.2
ARG OPENJDK_MAJOR_VERSION=17
ARG OPENJDK_FULL_VERSION=17.0.8
ARG OPENJDK_VERSION_SUFFIX=7
ARG GO_VERSION=1.24.3
ARG GO_VERSION=1.25.0

# Manually prepare a recent enough version of CMake.
# This should be used on platforms where the default package manager
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ RUN Copy-Item -Path C:\Windows\System32\msvcp140.dll -Destination /work/out/bin/
#
# Install Golang
#
ADD https://go.dev/dl/go1.24.11.windows-amd64.msi /local/go1.24.11.windows-amd64.msi
ADD https://go.dev/dl/go1.25.0.windows-amd64.msi /local/go1.25.0.windows-amd64.msi

RUN Start-Process msiexec.exe `
-ArgumentList '/i C:\local\go1.24.11.windows-amd64.msi ', '/quiet ', `
-ArgumentList '/i C:\local\go1.25.0.windows-amd64.msi ', '/quiet ', `
'/norestart ', 'ALLUSERS=1,INSTALLDIR=C:\Go' -NoNewWindow -Wait;

#
Expand All @@ -192,6 +192,8 @@ WORKDIR /goget
# https://github.com/google/googet/issues/83#issuecomment-2536975624
RUN go install github.com/google/googet/v2/goopack@v2.18.4;

ENV GO_BIN_PATH="C:\Go\bin"

###############################################################################
# Build fluent-bit
###############################################################################
Expand Down
102 changes: 52 additions & 50 deletions confgenerator/agentmetrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,24 @@ var grpcToHTTPStatus = map[string]string{
"DEADLINE_EXCEEDED": "504",
}

// Following reference : https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto
var grpcToStringStatus = map[string]string{
"0": "OK",
"1": "CANCELLED",
"2": "UNKNOWN",
"3": "INVALID_ARGUMENT",
"4": "DEADLINE_EXCEEDED",
"5": "NOT_FOUND",
"6": "ALREADY_EXISTS",
"7": "PERMISSION_DENIED",
"8": "RESOURCE_EXHAUSTED",
"9": "FAILED_PRECONDITION",
"10": "ABORTED",
"11": "OUT_OF_RANGE",
"12": "UNIMPLEMENTED",
"13": "INTERNAL",
"14": "UNAVAILABLE",
"15": "DATA_LOSS",
"16": "UNAUTHENTICATED",
var grpcCamelToSnake = map[string]string{
"OK": "OK",
"Canceled": "CANCELLED",
"Unknown": "UNKNOWN",
"InvalidArgument": "INVALID_ARGUMENT",
"DeadlineExceeded": "DEADLINE_EXCEEDED",
"NotFound": "NOT_FOUND",
"AlreadyExists": "ALREADY_EXISTS",
"PermissionDenied": "PERMISSION_DENIED",
"ResourceExhausted": "RESOURCE_EXHAUSTED",
"FailedPrecondition": "FAILED_PRECONDITION",
"Aborted": "ABORTED",
"OutOfRange": "OUT_OF_RANGE",
"Unimplemented": "UNIMPLEMENTED",
"Internal": "INTERNAL",
"Unavailable": "UNAVAILABLE",
"DataLoss": "DATA_LOSS",
"Unauthenticated": "UNAUTHENTICATED",
}

func (r AgentSelfMetrics) AddSelfMetricsPipelines(receiverPipelines map[string]otel.ReceiverPipeline, pipelines map[string]otel.Pipeline, ctx context.Context) {
Expand Down Expand Up @@ -142,70 +141,74 @@ func (r AgentSelfMetrics) PrometheusMetricsPipeline(ctx context.Context) otel.Re
Processors: map[string][]otel.Component{
"metrics": {
otel.TransformationMetrics(
otel.DeleteMetricResourceAttribute("service.name"),
otel.DeleteMetricResourceAttribute("service.version"),
otel.DeleteMetricResourceAttribute("service.instance.id"),
otel.DeleteMetricResourceAttribute("server.port"),
otel.DeleteMetricResourceAttribute("url.scheme"),
otel.DeleteMetricResourceAttribute("service_name"),
otel.DeleteMetricResourceAttribute("service_version"),
otel.DeleteMetricResourceAttribute("service_instance_id"),
otel.DeleteMetricResourceAttribute("server_port"),
otel.DeleteMetricResourceAttribute("url_scheme"),
),
},
},
}, ctx)
}

func (r AgentSelfMetrics) OtelPipelineProcessors(ctx context.Context) []otel.Component {
durationMetric := "grpc.client.attempt.duration"
durationMetric := "grpc_client_attempt_duration"
durationCountMetric := "grpc_client_attempt_duration_count"
filteredMetrics := []string{
"grpc.client.attempt.duration_count",
"googlecloudmonitoring/point_count",
durationCountMetric,
"googlecloudmonitoring_point_count",
}
pointCountMetric := otel.RenameMetric("googlecloudmonitoring/point_count", "agent/monitoring/point_count",
pointCountMetric := otel.RenameMetric("googlecloudmonitoring_point_count", "agent/monitoring/point_count",
// change data type from double -> int64
otel.ToggleScalarDataType,
// Remove service.version label
otel.AggregateLabels("sum", "status"),
)
apiRequestCount := otel.RenameMetric("grpc.client.attempt.duration_count", "agent/api_request_count",
otel.RenameLabel("grpc.status", "state"),
apiRequestCount := otel.RenameMetric(durationCountMetric, "agent/api_request_count",
otel.RenameLabel("grpc_status", "state"),
// delete grpc_client_method dimension & service.version label, retaining only state
otel.AggregateLabels("sum", "state"),
)
metricFilter := otel.MetricsOTTLFilter([]string{}, []string{
// Filter out histogram datapoints where the grpc.target is not related to monitoring.
`metric.name == "grpc.client.attempt.duration_count" and (not IsMatch(datapoint.attributes["grpc.target"], "monitoring.googleapis"))`,
// Filter out histogram datapoints where the grpc_target is not related to monitoring.
`metric.name == "` + durationCountMetric + `" and (not IsMatch(datapoint.attributes["grpc_target"], "monitoring.googleapis"))`,
})

expOtlpExporter := experimentsFromContext(ctx)["otlp_exporter"]
var extraTransforms []map[string]interface{}
if expOtlpExporter {
durationMetric = "rpc.client.duration"
durationMetric = "rpc_client_call_duration"
durationCountMetric = "rpc_client_call_duration_count"
filteredMetrics = []string{
"otelcol_exporter_sent_metric_points",
"otelcol_exporter_send_failed_metric_points",
"rpc.client.duration_count",
durationCountMetric,
}
extraTransforms = []map[string]interface{}{
otel.UpdateMetric("otelcol_exporter_sent_metric_points",
otel.ToggleScalarDataType,
otel.AddLabel("status", "OK"),
otel.AggregateLabels("sum", "status"),
),
otel.UpdateMetric("otelcol_exporter_send_failed_metric_points",
otel.ToggleScalarDataType,
otel.AddLabel("status", "UNKNOWN"),
otel.AggregateLabels("sum", "status"),
),
}
// b/468059325: Factor in partial success after upstream bug is fixed.
pointCountMetric = otel.CombineMetrics("otelcol_exporter_sent_metric_points|otelcol_exporter_send_failed_metric_points", "agent/monitoring/point_count",
otel.AggregateLabels("sum", "status"))
apiRequestCount = otel.RenameMetric("rpc.client.duration_count", "agent/api_request_count",
otel.RenameLabelValues("rpc.grpc.status_code", grpcToStringStatus),
otel.RenameLabel("rpc.grpc.status_code", "state"),
apiRequestCount = otel.RenameMetric(durationCountMetric, "agent/api_request_count",
otel.RenameLabelValues("rpc_response_status_code", grpcCamelToSnake),
otel.RenameLabel("rpc_response_status_code", "state"),
// delete all other labels, retaining only state
otel.AggregateLabels("sum", "state"))

metricFilter = otel.MetricsOTTLFilter([]string{}, []string{
// Filter out histogram datapoints where the rpc.service is not related to monitoring.
`metric.name == "rpc.client.duration_count" and (not IsMatch(datapoint.attributes["rpc.service"], "opentelemetry.proto.collector.metrics.v1.MetricsService"))`,
`metric.name == "` + durationCountMetric + `" and (not IsMatch(datapoint.attributes["rpc_method"], "opentelemetry.proto.collector.metrics.v1.MetricsService/Export"))`,
})
}

Expand Down Expand Up @@ -267,34 +270,33 @@ func (r AgentSelfMetrics) FluentBitPipelineProcessors() []otel.Component {
}

func (r AgentSelfMetrics) LoggingMetricsPipelineProcessors(ctx context.Context) []otel.Component {
durationMetric := "grpc.client.attempt.duration"
durationCountMetric := "grpc.client.attempt.duration_count"
durationMetric := "grpc_client_attempt_duration"
durationCountMetric := "grpc_client_attempt_duration_count"

metricFilter := otel.MetricsOTTLFilter([]string{}, []string{
// Filter out histogram datapoints where the grpc.target is not related to logging.
`metric.name == "grpc.client.attempt.duration_count" and (not IsMatch(datapoint.attributes["grpc.target"], "logging.googleapis"))`,
// Filter out histogram datapoints where the grpc_target is not related to logging.
`metric.name == "` + durationCountMetric + `" and (not IsMatch(datapoint.attributes["grpc_target"], "logging.googleapis"))`,
})

otelRequestCount := otel.RenameMetric(durationCountMetric, "otel_request_count",
otel.RenameLabel("grpc.status", "response_code"),
otel.RenameLabel("grpc_status", "response_code"),
otel.RenameLabelValues("response_code", grpcToHTTPStatus),
// delete grpc_client_method dimension & service.version label, retaining only response_code
otel.AggregateLabels("sum", "response_code"),
)

expOtlpExporter := experimentsFromContext(ctx)["otlp_exporter"]
if expOtlpExporter {
durationMetric = "rpc.client.duration"
durationCountMetric = "rpc.client.duration_count"
durationMetric = "rpc_client_call_duration"
durationCountMetric = "rpc_client_call_duration_count"

metricFilter = otel.MetricsOTTLFilter([]string{}, []string{
// Filter out histogram datapoints where the rpc.service is not related to logging.
`metric.name == "rpc.client.duration_count" and (not IsMatch(datapoint.attributes["rpc.service"], "opentelemetry.proto.collector.logs.v1.LogsService"))`,
// Filter out histogram datapoints where the rpc.method is not related to logging.
`metric.name == "` + durationCountMetric + `" and (not IsMatch(datapoint.attributes["rpc_method"], "opentelemetry.proto.collector.logs.v1.LogsService/Export"))`,
})

otelRequestCount = otel.RenameMetric(durationCountMetric, "otel_request_count",
otel.RenameLabelValues("rpc.grpc.status_code", grpcToStringStatus),
otel.RenameLabel("rpc.grpc.status_code", "response_code"),
otel.RenameLabelValues("rpc_response_status_code", grpcCamelToSnake),
otel.RenameLabel("rpc_response_status_code", "response_code"),
otel.RenameLabelValues("response_code", grpcToHTTPStatus),
otel.AggregateLabels("sum", "response_code"),
)
Expand Down
1 change: 1 addition & 0 deletions confgenerator/logging_receivers.go
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@ func (r LoggingReceiverWindowsEventLog) Pipelines(ctx context.Context) ([]otel.R
receiver_config := map[string]any{
"channel": c,
"start_at": "beginning",
"event_data_format": "array",
"poll_interval": "1s",
"ignore_channel_errors": true,
"storage": fileStorageExtensionType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ processors:
filter/loggingmetrics_1:
metrics:
datapoint:
- metric.name == "grpc.client.attempt.duration_count" and (not IsMatch(datapoint.attributes["grpc.target"], "logging.googleapis"))
- metric.name == "grpc_client_attempt_duration_count" and (not IsMatch(datapoint.attributes["grpc_target"], "logging.googleapis"))
filter/loggingmetrics_2:
metrics:
include:
Expand All @@ -52,20 +52,20 @@ processors:
- fluentbit_stackdriver_retried_records_total
- otelcol_exporter_sent_log_records
- otelcol_exporter_send_failed_log_records
- grpc.client.attempt.duration_count
- grpc_client_attempt_duration_count
filter/otel_1:
metrics:
datapoint:
- metric.name == "grpc.client.attempt.duration_count" and (not IsMatch(datapoint.attributes["grpc.target"], "monitoring.googleapis"))
- metric.name == "grpc_client_attempt_duration_count" and (not IsMatch(datapoint.attributes["grpc_target"], "monitoring.googleapis"))
filter/otel_2:
metrics:
include:
match_type: strict
metric_names:
- otelcol_process_uptime
- otelcol_process_memory_rss
- grpc.client.attempt.duration_count
- googlecloudmonitoring/point_count
- grpc_client_attempt_duration_count
- googlecloudmonitoring_point_count
interval/loggingmetrics_7:
interval: 1m
metricstransform/fluentbit_1:
Expand Down Expand Up @@ -423,11 +423,11 @@ processors:
label_set:
- response_code
- action: update
include: grpc.client.attempt.duration_count
include: grpc_client_attempt_duration_count
new_name: otel_request_count
operations:
- action: update_label
label: grpc.status
label: grpc_status
new_label: response_code
- action: update_label
label: response_code
Expand Down Expand Up @@ -544,18 +544,18 @@ processors:
aggregation_type: sum
label_set: []
- action: update
include: grpc.client.attempt.duration_count
include: grpc_client_attempt_duration_count
new_name: agent/api_request_count
operations:
- action: update_label
label: grpc.status
label: grpc_status
new_label: state
- action: aggregate_labels
aggregation_type: sum
label_set:
- state
- action: update
include: googlecloudmonitoring/point_count
include: googlecloudmonitoring_point_count
new_name: agent/monitoring/point_count
operations:
- action: toggle_scalar_data_type
Expand All @@ -574,17 +574,17 @@ processors:
metric_statements:
- context: metric
statements:
- delete_key(resource.attributes, "service.name")
- delete_key(resource.attributes, "service.version")
- delete_key(resource.attributes, "service.instance.id")
- delete_key(resource.attributes, "server.port")
- delete_key(resource.attributes, "url.scheme")
- delete_key(resource.attributes, "service_name")
- delete_key(resource.attributes, "service_version")
- delete_key(resource.attributes, "service_instance_id")
- delete_key(resource.attributes, "server_port")
- delete_key(resource.attributes, "url_scheme")
transform/loggingmetrics_0:
error_mode: ignore
metric_statements:
- context: metric
statements:
- extract_count_metric(true) where name == "grpc.client.attempt.duration"
- extract_count_metric(true) where name == "grpc_client_attempt_duration"
transform/loggingmetrics_5:
metric_statements:
- context: metric
Expand All @@ -611,7 +611,7 @@ processors:
metric_statements:
- context: metric
statements:
- extract_count_metric(true) where name == "grpc.client.attempt.duration"
- extract_count_metric(true) where name == "grpc_client_attempt_duration"
receivers:
hostmetrics/hostmetrics:
collection_interval: 60s
Expand Down
Loading
Loading