-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
108 additions
and
68 deletions.
There are no files selected for viewing
97 changes: 51 additions & 46 deletions
97
transformation_test/testdata/ops_agent_test-TestLogEntrySpecialFields/output_otel.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,52 @@ | ||
- exit_error: exit status 2 | ||
- collector_errors: | ||
- caller: internal/base_exporter.go:130 | ||
error: "could not process attribute gcp.source_location: json: cannot unmarshal string into Go struct field LogEntrySourceLocation.line of type int64" | ||
level: error | ||
msg: Exporting failed. Rejecting data. Try enabling sending_queue to survive temporary failures. | ||
rejected_items: 1.0 | ||
stacktrace: |- | ||
go.opentelemetry.io/collector/exporter/exporterhelper/internal.(*BaseExporter).Send | ||
go.opentelemetry.io/collector/[email protected]/exporterhelper/internal/base_exporter.go:130 | ||
go.opentelemetry.io/collector/exporter/exporterhelper.NewLogsRequest.func1 | ||
go.opentelemetry.io/collector/[email protected]/exporterhelper/logs.go:138 | ||
go.opentelemetry.io/collector/consumer.ConsumeLogsFunc.ConsumeLogs | ||
go.opentelemetry.io/collector/[email protected]/logs.go:26 | ||
go.opentelemetry.io/collector/internal/fanoutconsumer.(*logsConsumer).ConsumeLogs | ||
go.opentelemetry.io/[email protected]/internal/fanoutconsumer/logs.go:62 | ||
go.opentelemetry.io/collector/processor/processorhelper.NewLogs.func1 | ||
go.opentelemetry.io/collector/[email protected]/processorhelper/logs.go:66 | ||
go.opentelemetry.io/collector/consumer.ConsumeLogsFunc.ConsumeLogs | ||
go.opentelemetry.io/collector/[email protected]/logs.go:26 | ||
go.opentelemetry.io/collector/processor/processorhelper.NewLogs.func1 | ||
go.opentelemetry.io/collector/[email protected]/processorhelper/logs.go:66 | ||
go.opentelemetry.io/collector/consumer.ConsumeLogsFunc.ConsumeLogs | ||
go.opentelemetry.io/collector/[email protected]/logs.go:26 | ||
go.opentelemetry.io/collector/consumer.ConsumeLogsFunc.ConsumeLogs | ||
go.opentelemetry.io/collector/[email protected]/logs.go:26 | ||
go.opentelemetry.io/collector/internal/fanoutconsumer.(*logsConsumer).ConsumeLogs | ||
go.opentelemetry.io/[email protected]/internal/fanoutconsumer/logs.go:62 | ||
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/consumerretry.(*logsConsumer).ConsumeLogs | ||
github.com/open-telemetry/opentelemetry-collector-contrib/internal/[email protected]/consumerretry/logs.go:37 | ||
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter.(*receiver).consumerLoop | ||
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/[email protected]/adapter/receiver.go:110 | ||
- caller: consumerretry/logs.go:39 | ||
error: "could not process attribute gcp.source_location: json: cannot unmarshal string into Go struct field LogEntrySourceLocation.line of type int64" | ||
level: error | ||
msg: ConsumeLogs() failed. Enable retry_on_failure to slow down reading logs and avoid dropping. | ||
stacktrace: |- | ||
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/consumerretry.(*logsConsumer).ConsumeLogs | ||
github.com/open-telemetry/opentelemetry-collector-contrib/internal/[email protected]/consumerretry/logs.go:39 | ||
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter.(*receiver).consumerLoop | ||
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/[email protected]/adapter/receiver.go:110 | ||
- caller: adapter/receiver.go:112 | ||
error: "could not process attribute gcp.source_location: json: cannot unmarshal string into Go struct field LogEntrySourceLocation.line of type int64" | ||
level: error | ||
msg: ConsumeLogs() failed | ||
stacktrace: |- | ||
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter.(*receiver).consumerLoop | ||
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/[email protected]/adapter/receiver.go:112 | ||
- stderr: | | ||
panic: runtime error: invalid memory address or nil pointer dereference | ||
[signal SIGSEGV: segmentation violation code=0xX addr=0xX pc=0xX] | ||
goroutine N [running]: | ||
go.opentelemetry.io/collector/pdata/pcommon.ByteSlice.AsRaw(...) | ||
go.opentelemetry.io/collector/[email protected]/pcommon/generated_byteslice.go:37 | ||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector.logMapper.logToSplitEntries(...) | ||
github.com/!google!cloud!platform/opentelemetry-operations-go/exporter/[email protected]/logs.go:397 +0xX | ||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector.logMapper.createEntries(...) | ||
github.com/!google!cloud!platform/opentelemetry-operations-go/exporter/[email protected]/logs.go:282 +0xX | ||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector.(*LogsExporter).PushLogs(...) | ||
github.com/!google!cloud!platform/opentelemetry-operations-go/exporter/[email protected]/logs.go:199 +0xX | ||
go.opentelemetry.io/collector/exporter/exporterhelper.(*logsRequest).Export(...) | ||
go.opentelemetry.io/collector/[email protected]/exporterhelper/logs.go:58 +0xX | ||
go.opentelemetry.io/collector/exporter/exporterhelper.(*timeoutSender).send(...) | ||
go.opentelemetry.io/collector/[email protected]/exporterhelper/timeout_sender.go:38 +0xX | ||
go.opentelemetry.io/collector/exporter/exporterhelper.(*baseRequestSender).send(...) | ||
go.opentelemetry.io/collector/[email protected]/exporterhelper/common.go:33 +0xX | ||
go.opentelemetry.io/collector/exporter/exporterhelper.(*logsExporterWithObservability).send(...) | ||
go.opentelemetry.io/collector/[email protected]/exporterhelper/logs.go:170 +0xX | ||
go.opentelemetry.io/collector/exporter/exporterhelper.(*baseRequestSender).send(...) | ||
go.opentelemetry.io/collector/[email protected]/exporterhelper/common.go:33 | ||
go.opentelemetry.io/collector/exporter/exporterhelper.(*errorLoggingRequestSender).send(...) | ||
go.opentelemetry.io/collector/[email protected]/exporterhelper/common.go:47 +0xX | ||
go.opentelemetry.io/collector/exporter/exporterhelper.(*baseExporter).send(...) | ||
go.opentelemetry.io/collector/[email protected]/exporterhelper/common.go:193 | ||
go.opentelemetry.io/collector/exporter/exporterhelper.NewLogsExporter.func1(...) | ||
go.opentelemetry.io/collector/[email protected]/exporterhelper/logs.go:98 +0xX | ||
go.opentelemetry.io/collector/consumer.ConsumeLogsFunc.ConsumeLogs(...) | ||
go.opentelemetry.io/collector/[email protected]/logs.go:25 | ||
go.opentelemetry.io/collector/processor/processorhelper.NewLogsProcessor.func1(...) | ||
go.opentelemetry.io/collector/[email protected]/processorhelper/logs.go:60 +0xX | ||
go.opentelemetry.io/collector/consumer.ConsumeLogsFunc.ConsumeLogs(...) | ||
go.opentelemetry.io/collector/[email protected]/logs.go:25 | ||
go.opentelemetry.io/collector/processor/processorhelper.NewLogsProcessor.func1(...) | ||
go.opentelemetry.io/collector/[email protected]/processorhelper/logs.go:60 +0xX | ||
go.opentelemetry.io/collector/consumer.ConsumeLogsFunc.ConsumeLogs(...) | ||
go.opentelemetry.io/collector/[email protected]/logs.go:25 | ||
go.opentelemetry.io/collector/consumer.ConsumeLogsFunc.ConsumeLogs(...) | ||
go.opentelemetry.io/collector/[email protected]/logs.go:25 | ||
go.opentelemetry.io/collector/internal/fanoutconsumer.(*logsConsumer).ConsumeLogs(...) | ||
go.opentelemetry.io/[email protected]/internal/fanoutconsumer/logs.go:65 +0xX | ||
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/consumerretry.(*logsConsumer).ConsumeLogs(...) | ||
github.com/open-telemetry/opentelemetry-collector-contrib/internal/[email protected]/consumerretry/logs.go:37 +0xX | ||
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter.(*receiver).consumerLoop(...) | ||
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/[email protected]/adapter/receiver.go:125 +0xX | ||
created by github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter.(*receiver).Start in goroutine N | ||
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/[email protected]/adapter/receiver.go:68 +0xX |
77 changes: 56 additions & 21 deletions
77
transformation_test/testdata/parse_with_conflicts_with_record/output_otel.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,56 @@ | ||
- entries: | ||
- jsonPayload: | ||
non-overwritten-field: non-overwritten | ||
original-field: original-value | ||
overwritten-field: overwritten | ||
parsed-field: parsed-value | ||
labels: | ||
non-overwritten-label: non-overwritten | ||
original-label: original-label | ||
overwritten-label: overwritten | ||
parsed-label: parsed-label | ||
logName: projects/my-project/logs/my-log-name | ||
resource: | ||
labels: | ||
instance_id: test-instance-id | ||
zone: test-zone | ||
type: gce_instance | ||
sourceLocation: | ||
file: overwritten-file-path | ||
timestamp: now | ||
partialSuccess: true | ||
- exit_error: exit status 2 | ||
- collector_errors: | ||
- stderr: | | ||
panic: runtime error: invalid memory address or nil pointer dereference | ||
[signal SIGSEGV: segmentation violation code=0xX addr=0xX pc=0xX] | ||
goroutine N [running]: | ||
go.opentelemetry.io/collector/pdata/pcommon.ByteSlice.AsRaw(...) | ||
go.opentelemetry.io/collector/[email protected]/pcommon/generated_byteslice.go:37 | ||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector.logMapper.logToSplitEntries(...) | ||
github.com/!google!cloud!platform/opentelemetry-operations-go/exporter/[email protected]/logs.go:397 +0xX | ||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector.logMapper.createEntries(...) | ||
github.com/!google!cloud!platform/opentelemetry-operations-go/exporter/[email protected]/logs.go:282 +0xX | ||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector.(*LogsExporter).PushLogs(...) | ||
github.com/!google!cloud!platform/opentelemetry-operations-go/exporter/[email protected]/logs.go:199 +0xX | ||
go.opentelemetry.io/collector/exporter/exporterhelper.(*logsRequest).Export(...) | ||
go.opentelemetry.io/collector/[email protected]/exporterhelper/logs.go:58 +0xX | ||
go.opentelemetry.io/collector/exporter/exporterhelper.(*timeoutSender).send(...) | ||
go.opentelemetry.io/collector/[email protected]/exporterhelper/timeout_sender.go:38 +0xX | ||
go.opentelemetry.io/collector/exporter/exporterhelper.(*baseRequestSender).send(...) | ||
go.opentelemetry.io/collector/[email protected]/exporterhelper/common.go:33 +0xX | ||
go.opentelemetry.io/collector/exporter/exporterhelper.(*logsExporterWithObservability).send(...) | ||
go.opentelemetry.io/collector/[email protected]/exporterhelper/logs.go:170 +0xX | ||
go.opentelemetry.io/collector/exporter/exporterhelper.(*baseRequestSender).send(...) | ||
go.opentelemetry.io/collector/[email protected]/exporterhelper/common.go:33 | ||
go.opentelemetry.io/collector/exporter/exporterhelper.(*errorLoggingRequestSender).send(...) | ||
go.opentelemetry.io/collector/[email protected]/exporterhelper/common.go:47 +0xX | ||
go.opentelemetry.io/collector/exporter/exporterhelper.(*baseExporter).send(...) | ||
go.opentelemetry.io/collector/[email protected]/exporterhelper/common.go:193 | ||
go.opentelemetry.io/collector/exporter/exporterhelper.NewLogsExporter.func1(...) | ||
go.opentelemetry.io/collector/[email protected]/exporterhelper/logs.go:98 +0xX | ||
go.opentelemetry.io/collector/consumer.ConsumeLogsFunc.ConsumeLogs(...) | ||
go.opentelemetry.io/collector/[email protected]/logs.go:25 | ||
go.opentelemetry.io/collector/processor/processorhelper.NewLogsProcessor.func1(...) | ||
go.opentelemetry.io/collector/[email protected]/processorhelper/logs.go:60 +0xX | ||
go.opentelemetry.io/collector/consumer.ConsumeLogsFunc.ConsumeLogs(...) | ||
go.opentelemetry.io/collector/[email protected]/logs.go:25 | ||
go.opentelemetry.io/collector/processor/processorhelper.NewLogsProcessor.func1(...) | ||
go.opentelemetry.io/collector/[email protected]/processorhelper/logs.go:60 +0xX | ||
go.opentelemetry.io/collector/consumer.ConsumeLogsFunc.ConsumeLogs(...) | ||
go.opentelemetry.io/collector/[email protected]/logs.go:25 | ||
go.opentelemetry.io/collector/processor/processorhelper.NewLogsProcessor.func1(...) | ||
go.opentelemetry.io/collector/[email protected]/processorhelper/logs.go:60 +0xX | ||
go.opentelemetry.io/collector/consumer.ConsumeLogsFunc.ConsumeLogs(...) | ||
go.opentelemetry.io/collector/[email protected]/logs.go:25 | ||
go.opentelemetry.io/collector/consumer.ConsumeLogsFunc.ConsumeLogs(...) | ||
go.opentelemetry.io/collector/[email protected]/logs.go:25 | ||
go.opentelemetry.io/collector/internal/fanoutconsumer.(*logsConsumer).ConsumeLogs(...) | ||
go.opentelemetry.io/[email protected]/internal/fanoutconsumer/logs.go:65 +0xX | ||
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/consumerretry.(*logsConsumer).ConsumeLogs(...) | ||
github.com/open-telemetry/opentelemetry-collector-contrib/internal/[email protected]/consumerretry/logs.go:37 +0xX | ||
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter.(*receiver).consumerLoop(...) | ||
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/[email protected]/adapter/receiver.go:125 +0xX | ||
created by github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter.(*receiver).Start in goroutine N | ||
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/[email protected]/adapter/receiver.go:68 +0xX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters