Open hgaol opened 4 months ago
The implementation could be found here. https://github.com/hgaol/opentelemetry-collector-contrib/tree/azureblob-exporter-dev
example ocb config.
dist:
module: go.opentelemetry.io/collector/cmd/otelcorecol
name: otelcorecol
description: Local OpenTelemetry Collector binary, testing only.
version: 0.103.0-dev
otelcol_version: 0.103.0
output_path: .
receivers:
- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.103.0
exporters:
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azureblobexporter v0.1.0
providers:
- gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v0.103.0
- gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v0.103.0
- gomod: go.opentelemetry.io/collector/confmap/provider/httpprovider v0.103.0
- gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.103.0
- gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.103.0
replaces:
- github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azureblobexporter => github.com/hgaol/opentelemetry-collector-contrib/exporter/azureblobexporter v0.1.0
example otel-config.yaml
.
receivers:
otlp:
protocols:
grpc:
endpoint: localhost:4317
http:
endpoint: localhost:4318
exporters:
azureblob/3:
auth:
type: "connection_string"
connection_string: "DefaultEndpointsProtocol=https;AccountName=<accout name>;AccountKey=<key>;EndpointSuffix=core.windows.net"
container:
metrics: "test"
logs: "test"
traces: "test"
service:
pipelines:
traces:
receivers: [ otlp ]
exporters: [ azureblob/3 ]
logs:
receivers: [ otlp ]
exporters: [ azureblob/3 ]
metrics:
receivers: [ otlp ]
exporters: [ azureblob/3 ]
example output.
2024-09-02T23:48:07.132+0800 info service@v0.103.0/service.go:208 Everything is ready. Begin running and processing data.
2024-09-02T23:48:07.132+0800 warn localhostgate/featuregate.go:63 The default endpoints for all servers in components will change to use localhost instead of 0.0.0.0 in a future version. Use the feature gate to preview the new default. {"feature gate ID": "component.UseLocalHostAsDefaultHost"}
2024-09-02T23:48:11.318+0800 info azureblobexporter@v0.1.0/exporter.go:225 Successfully exported traces to Azure Blob Storage {"kind": "exporter", "data_type": "traces", "name": "azureblob/3", "container": "test", "blob": "2024/09/02/traces_23_48_11_518409.json", "size": 2476}
demo.
Please come to a SIG meeting to discuss this exporter.
Please come to a SIG meeting to discuss this exporter.
Thanks for response @atoulme ! I've joined SIG meeting at Aug 28, 2024 for this new component. I got suggestions that it'll not be assigned a sponsor automatically and I need to find one.
The purpose and use-cases of the new component
Azure Blob Storage is Microsoft's object storage solution for the cloud. Blob Storage is optimized for storing massive amounts of unstructured data. It's also used to batch analysis via ADLA, Synapse and other services to analyze big data. link
Example configuration for the component
The following settings are required:
https://<account-name>.blob.core.windows.net/
url
parameter to the storage account.The following settings can be optionally configured and have default values:
metrics
): container to store metrics. default value ismetrics
.logs
): container to store logs. default value islogs
.traces
): container to store traces. default value istraces
.{{.Year}}/{{.Month}}/{{.Day}}/{{.BlobName}}_{{.Hour}}_{{.Minute}}_{{.Second}}_{{.SerialNum}}.{{.FileExtension}}
): blob name format.BlobName
.metrics
): default ismetrics
.traces
): default istraces
.logs
): default islogs
.2006
): The date format follows constants in Golang, refer here.01
): similar as year.02
): similar as year.15
): similar as year.04
): similar as year.05
): similar as year.json
):json
orproto
. which present otel json or otel protobuf format, the file extension will bejson
orpb
.An example configuration is provided as follows:
Telemetry data types supported
traces, metrics, logs
Is this a vendor-specific component?
Code Owner(s)
@hgaol
Sponsor (optional)
No response
Additional context
I found there's an issue about Azure Blob exporter 2 years ago and the issue is marked as staled #8823 . Thus, I'd like to contribute this component with some more functionalities like more authentication methods, signals and others.