Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions otelconf/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,9 @@ var v10OpenTelemetryConfig = OpenTelemetryConfiguration{
ExportTimeout: ptr(30000),
Exporter: LogRecordExporter{
OTLPHttp: &OTLPHttpExporter{
CertificateFile: ptr("/app/cert.pem"),
ClientCertificateFile: ptr("/app/cert.pem"),
ClientKeyFile: ptr("/app/cert.pem"),
CertificateFile: ptr("testdata/ca.crt"),
ClientCertificateFile: ptr("testdata/client.crt"),
ClientKeyFile: ptr("testdata/client.key"),
Compression: ptr("gzip"),
Encoding: ptr(OTLPHttpEncodingProtobuf),
Endpoint: ptr("http://localhost:4318/v1/logs"),
Expand All @@ -579,9 +579,9 @@ var v10OpenTelemetryConfig = OpenTelemetryConfiguration{
Batch: &BatchLogRecordProcessor{
Exporter: LogRecordExporter{
OTLPGrpc: &OTLPGrpcExporter{
CertificateFile: ptr("/app/cert.pem"),
ClientCertificateFile: ptr("/app/cert.pem"),
ClientKeyFile: ptr("/app/cert.pem"),
CertificateFile: ptr("testdata/ca.crt"),
ClientCertificateFile: ptr("testdata/client.crt"),
ClientKeyFile: ptr("testdata/client.key"),
Compression: ptr("gzip"),
Endpoint: ptr("http://localhost:4317"),
Headers: []NameStringValuePair{
Expand Down Expand Up @@ -689,9 +689,9 @@ var v10OpenTelemetryConfig = OpenTelemetryConfiguration{
},
Exporter: PushMetricExporter{
OTLPHttp: &OTLPHttpMetricExporter{
CertificateFile: ptr("/app/cert.pem"),
ClientCertificateFile: ptr("/app/cert.pem"),
ClientKeyFile: ptr("/app/cert.pem"),
CertificateFile: ptr("testdata/ca.crt"),
ClientCertificateFile: ptr("testdata/client.crt"),
ClientKeyFile: ptr("testdata/client.key"),
Compression: ptr("gzip"),
DefaultHistogramAggregation: ptr(ExporterDefaultHistogramAggregationBase2ExponentialBucketHistogram),
Endpoint: ptr("http://localhost:4318/v1/metrics"),
Expand All @@ -712,9 +712,9 @@ var v10OpenTelemetryConfig = OpenTelemetryConfiguration{
Periodic: &PeriodicMetricReader{
Exporter: PushMetricExporter{
OTLPGrpc: &OTLPGrpcMetricExporter{
CertificateFile: ptr("/app/cert.pem"),
ClientCertificateFile: ptr("/app/cert.pem"),
ClientKeyFile: ptr("/app/cert.pem"),
CertificateFile: ptr("testdata/ca.crt"),
ClientCertificateFile: ptr("testdata/client.crt"),
ClientKeyFile: ptr("testdata/client.key"),
Compression: ptr("gzip"),
DefaultHistogramAggregation: ptr(ExporterDefaultHistogramAggregationBase2ExponentialBucketHistogram),
Endpoint: ptr("http://localhost:4317"),
Expand Down Expand Up @@ -863,9 +863,9 @@ var v10OpenTelemetryConfig = OpenTelemetryConfiguration{
ExportTimeout: ptr(30000),
Exporter: SpanExporter{
OTLPHttp: &OTLPHttpExporter{
CertificateFile: ptr("/app/cert.pem"),
ClientCertificateFile: ptr("/app/cert.pem"),
ClientKeyFile: ptr("/app/cert.pem"),
CertificateFile: ptr("testdata/ca.crt"),
ClientCertificateFile: ptr("testdata/client.crt"),
ClientKeyFile: ptr("testdata/client.key"),
Compression: ptr("gzip"),
Encoding: ptr(OTLPHttpEncodingProtobuf),
Endpoint: ptr("http://localhost:4318/v1/traces"),
Expand All @@ -885,9 +885,9 @@ var v10OpenTelemetryConfig = OpenTelemetryConfiguration{
Batch: &BatchSpanProcessor{
Exporter: SpanExporter{
OTLPGrpc: &OTLPGrpcExporter{
CertificateFile: ptr("/app/cert.pem"),
ClientCertificateFile: ptr("/app/cert.pem"),
ClientKeyFile: ptr("/app/cert.pem"),
CertificateFile: ptr("testdata/ca.crt"),
ClientCertificateFile: ptr("testdata/client.crt"),
ClientKeyFile: ptr("testdata/client.key"),
Compression: ptr("gzip"),
Endpoint: ptr("http://localhost:4317"),
Headers: []NameStringValuePair{
Expand Down
22 changes: 22 additions & 0 deletions otelconf/testdata/client.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
-----BEGIN CERTIFICATE-----
MIIDnzCCAoegAwIBAgIUBxmeJyLb45dq6RmW5bOFIl8VON0wDQYJKoZIhvcNAQEL
BQAwXzELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcM
DVNhbiBGcmFuY2lzY28xEzARBgNVBAoMCk15IENvbXBhbnkxDjAMBgNVBAMMBU15
IENBMB4XDTI1MDQxNTEyMjM0MloXDTI2MDQxNTEyMjM0MlowXzELMAkGA1UEBhMC
VVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28x
EzARBgNVBAoMCk15IENvbXBhbnkxDjAMBgNVBAMMBU15IENBMIIBIjANBgkqhkiG
9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3ywD9NQpjd2H/PaHnodeX6YWn67OaqODTsUs
mOcJphhfya+/lybNtWScHoiURpB40QhTacDsjQ7J0Trykznm6ynl06uSQZKONVxo
LW+FmCBDRE+BqmFBFdMEMvRBGVxns7IctzY//GaZbX81Ni1pyLrzrRG9B5LuU7Sb
yggByJrut72RC7bRgAz8v2s++JKvDVKRk3hTmSwCiEC30s9QUu1N9BGnib5V09v/
Sa7wseVp7ICGC0YckCkJMIjvzpaVMFA9/uMHFnloty+gMs/eMWGw0bb391QJb+k8
WQHRZAlKTaLKVqeXC5G5CvK+u3q6j+4hQG46IclOJ76lRY//MwIDAQABo1MwUTAd
BgNVHQ4EFgQU5QWO+akQtDDflpGrTaXR4zEeah8wHwYDVR0jBBgwFoAU5QWO+akQ
tDDflpGrTaXR4zEeah8wDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC
AQEAkNcppwcF+zjeZNmzGTccO1lSkPeC2LLlp/oEna0KUEGuKDFCemamxvESmua0
+bXt9vw1qd+VztDIZ+zB+yAYYWyKYm41Nu1+IweLD8jmKPoQc5UXiWlSdF1Sjeub
9vcuX/G+FPOAGklt6X62y/jnlcumv1SOMB2BftSdD1Co8Yl9NRqFf3/OiEvd10bH
UXttTae4XEOp5p06ZFHW4JAnrHWBeuiLNJoswdKbA3rQO1Z6u5ioakluNHiCJX6T
fcJxbEVmorLNfBOnZTm61rPsC5aVtvFAxXDDb6B00KBW9FrV9m2MEFw71bMmC8X3
rFaC9Gm5g2bfyX/65YBQyLwXRA==
-----END CERTIFICATE-----
File renamed without changes.
36 changes: 18 additions & 18 deletions otelconf/testdata/v1.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"exporter": {
"otlp_http": {
"endpoint": "http://localhost:4318/v1/logs",
"certificate_file": "/app/cert.pem",
"client_key_file": "/app/cert.pem",
"client_certificate_file": "/app/cert.pem",
"certificate_file": "testdata/ca.crt",
"client_key_file": "testdata/client.key",
"client_certificate_file": "testdata/client.crt",
"headers": [
{
"name": "api-key",
Expand All @@ -39,9 +39,9 @@
"exporter": {
"otlp_grpc": {
"endpoint": "http://localhost:4317",
"certificate_file": "/app/cert.pem",
"client_key_file": "/app/cert.pem",
"client_certificate_file": "/app/cert.pem",
"certificate_file": "testdata/ca.crt",
"client_key_file": "testdata/client.key",
"client_certificate_file": "testdata/client.crt",
"headers": [
{
"name": "api-key",
Expand Down Expand Up @@ -144,9 +144,9 @@
"exporter": {
"otlp_http": {
"endpoint": "http://localhost:4318/v1/metrics",
"certificate_file": "/app/cert.pem",
"client_key_file": "/app/cert.pem",
"client_certificate_file": "/app/cert.pem",
"certificate_file": "testdata/ca.crt",
"client_key_file": "testdata/client.key",
"client_certificate_file": "testdata/client.crt",
"headers": [
{
"name": "api-key",
Expand Down Expand Up @@ -183,9 +183,9 @@
"exporter": {
"otlp_grpc": {
"endpoint": "http://localhost:4317",
"certificate_file": "/app/cert.pem",
"client_key_file": "/app/cert.pem",
"client_certificate_file": "/app/cert.pem",
"certificate_file": "testdata/ca.crt",
"client_key_file": "testdata/client.key",
"client_certificate_file": "testdata/client.crt",
"headers": [
{
"name": "api-key",
Expand Down Expand Up @@ -329,9 +329,9 @@
"exporter": {
"otlp_http": {
"endpoint": "http://localhost:4318/v1/traces",
"certificate_file": "/app/cert.pem",
"client_key_file": "/app/cert.pem",
"client_certificate_file": "/app/cert.pem",
"certificate_file": "testdata/ca.crt",
"client_key_file": "testdata/client.key",
"client_certificate_file": "testdata/client.crt",
"headers": [
{
"name": "api-key",
Expand All @@ -351,9 +351,9 @@
"exporter": {
"otlp_grpc": {
"endpoint": "http://localhost:4317",
"certificate_file": "/app/cert.pem",
"client_key_file": "/app/cert.pem",
"client_certificate_file": "/app/cert.pem",
"certificate_file": "testdata/ca.crt",
"client_key_file": "testdata/client.key",
"client_certificate_file": "testdata/client.crt",
"headers": [
{
"name": "api-key",
Expand Down
36 changes: 18 additions & 18 deletions otelconf/testdata/v1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ logger_provider:
# Configure certificate used to verify a server's TLS credentials.
# Absolute path to certificate file in PEM format.
# If omitted or null, system default certificate verification is used for secure connections.
certificate_file: /app/cert.pem
certificate_file: testdata/ca.crt
# Configure mTLS private client key.
# Absolute path to client key file in PEM format. If set, .client_certificate must also be set.
# If omitted or null, mTLS is not used.
client_key_file: /app/cert.pem
client_key_file: testdata/client.key
# Configure mTLS client certificate.
# Absolute path to client certificate file in PEM format. If set, .client_key must also be set.
# If omitted or null, mTLS is not used.
client_certificate_file: /app/cert.pem
client_certificate_file: testdata/client.crt
# Configure headers. Entries have higher priority than entries from .headers_list.
# If an entry's .value is null, the entry is ignored.
headers:
Expand Down Expand Up @@ -96,15 +96,15 @@ logger_provider:
# Configure certificate used to verify a server's TLS credentials.
# Absolute path to certificate file in PEM format.
# If omitted or null, system default certificate verification is used for secure connections.
certificate_file: /app/cert.pem
certificate_file: testdata/ca.crt
# Configure mTLS private client key.
# Absolute path to client key file in PEM format. If set, .client_certificate must also be set.
# If omitted or null, mTLS is not used.
client_key_file: /app/cert.pem
client_key_file: testdata/client.key
# Configure mTLS client certificate.
# Absolute path to client certificate file in PEM format. If set, .client_key must also be set.
# If omitted or null, mTLS is not used.
client_certificate_file: /app/cert.pem
client_certificate_file: testdata/client.crt
# Configure headers. Entries have higher priority than entries from .headers_list.
# If an entry's .value is null, the entry is ignored.
headers:
Expand Down Expand Up @@ -279,15 +279,15 @@ meter_provider:
# Configure certificate used to verify a server's TLS credentials.
# Absolute path to certificate file in PEM format.
# If omitted or null, system default certificate verification is used for secure connections.
certificate_file: /app/cert.pem
certificate_file: testdata/ca.crt
# Configure mTLS private client key.
# Absolute path to client key file in PEM format. If set, .client_certificate must also be set.
# If omitted or null, mTLS is not used.
client_key_file: /app/cert.pem
client_key_file: testdata/client.key
# Configure mTLS client certificate.
# Absolute path to client certificate file in PEM format. If set, .client_key must also be set.
# If omitted or null, mTLS is not used.
client_certificate_file: /app/cert.pem
client_certificate_file: testdata/client.crt
# Configure headers. Entries have higher priority than entries from .headers_list.
# If an entry's .value is null, the entry is ignored.
headers:
Expand Down Expand Up @@ -360,15 +360,15 @@ meter_provider:
# Configure certificate used to verify a server's TLS credentials.
# Absolute path to certificate file in PEM format.
# If omitted or null, system default certificate verification is used for secure connections.
certificate_file: /app/cert.pem
certificate_file: testdata/ca.crt
# Configure mTLS private client key.
# Absolute path to client key file in PEM format. If set, .client_certificate must also be set.
# If omitted or null, mTLS is not used.
client_key_file: /app/cert.pem
client_key_file: testdata/client.key
# Configure mTLS client certificate.
# Absolute path to client certificate file in PEM format. If set, .client_key must also be set.
# If omitted or null, mTLS is not used.
client_certificate_file: /app/cert.pem
client_certificate_file: testdata/client.crt
# Configure headers. Entries have higher priority than entries from .headers_list.
# If an entry's .value is null, the entry is ignored.
headers:
Expand Down Expand Up @@ -591,15 +591,15 @@ tracer_provider:
# Configure certificate used to verify a server's TLS credentials.
# Absolute path to certificate file in PEM format.
# If omitted or null, system default certificate verification is used for secure connections.
certificate_file: /app/cert.pem
certificate_file: testdata/ca.crt
# Configure mTLS private client key.
# Absolute path to client key file in PEM format. If set, .client_certificate must also be set.
# If omitted or null, mTLS is not used.
client_key_file: /app/cert.pem
client_key_file: testdata/client.key
# Configure mTLS client certificate.
# Absolute path to client certificate file in PEM format. If set, .client_key must also be set.
# If omitted or null, mTLS is not used.
client_certificate_file: /app/cert.pem
client_certificate_file: testdata/client.crt
# Configure headers. Entries have higher priority than entries from .headers_list.
# If an entry's .value is null, the entry is ignored.
headers:
Expand Down Expand Up @@ -633,15 +633,15 @@ tracer_provider:
# Configure certificate used to verify a server's TLS credentials.
# Absolute path to certificate file in PEM format.
# If omitted or null, system default certificate verification is used for secure connections.
certificate_file: /app/cert.pem
certificate_file: testdata/ca.crt
# Configure mTLS private client key.
# Absolute path to client key file in PEM format. If set, .client_certificate must also be set.
# If omitted or null, mTLS is not used.
client_key_file: /app/cert.pem
client_key_file: testdata/client.key
# Configure mTLS client certificate.
# Absolute path to client certificate file in PEM format. If set, .client_key must also be set.
# If omitted or null, mTLS is not used.
client_certificate_file: /app/cert.pem
client_certificate_file: testdata/client.crt
# Configure headers. Entries have higher priority than entries from .headers_list.
# If an entry's .value is null, the entry is ignored.
headers:
Expand Down
Loading