Enterprise-grade Go SDK for TelemetryFlow - the observability platform that provides unified metrics, logs, and traces collection following OpenTelemetry standards.
All notable changes to the TelemetryFlow Go SDK will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.1.2 - 2026-01-04
-
V2 Endpoint Configuration: New methods for TFO v2 API endpoints
WithV2API(bool)- Enable/disable v2 API (default: true)WithV2Only()- Enable v2-only mode (disables v1 endpoints)WithTracesEndpoint(string)- Custom traces endpoint pathWithMetricsEndpoint(string)- Custom metrics endpoint pathWithLogsEndpoint(string)- Custom logs endpoint path- Default endpoints:
/v2/traces,/v2/metrics,/v2/logs
-
Config Getters: New configuration accessors
UseV2API()- Check if v2 API is enabledIsV2Only()- Check if v2-only mode is enabledTracesEndpoint()- Get traces endpoint pathMetricsEndpoint()- Get metrics endpoint pathLogsEndpoint()- Get logs endpoint path
-
Identity Configuration: New methods for collector identity
WithCollectorName(string)- Set collector nameWithCollectorNameFromEnv()- Read fromTELEMETRYFLOW_COLLECTOR_NAMEWithCollectorDescription(string)- Set collector descriptionWithCollectorHostname(string)- Set collector hostnameWithCollectorTag(key, value)- Add single tagWithCollectorTags(map[string]string)- Set all tagsWithEnrichResources(bool)- Enable/disable resource enrichmentWithDatacenter(string)- Set datacenter identifierWithDatacenterFromEnv()- Read fromTELEMETRYFLOW_DATACENTER
-
Identity Getters: New configuration accessors
CollectorName(),CollectorDescription(),CollectorHostname()CollectorTags(),IsEnrichResourcesEnabled(),Datacenter()
-
HTTP Headers: New TelemetryFlow-specific headers
X-TelemetryFlow-Collector-Name- Collector nameX-TelemetryFlow-Collector-Hostname- Collector hostnameX-TelemetryFlow-Environment- Deployment environmentX-TelemetryFlow-Datacenter- Datacenter identifierX-TelemetryFlow-API-Version- API version indicator (v2)
-
gRPC Metadata: Same headers added to gRPC interceptor
- All headers in lowercase for gRPC metadata compliance
-
Unified TFO Configuration: Added
configs/tfo-collector-unified.yamlfor full TFO v2-only mode- v2 endpoints only with mandatory authentication (
v2_only: true) - TFO exporter enabled with dedicated instances for traces, metrics, and logs
- Auto-injected authentication via
tfoauthextension - Collector identity enrichment via
tfoidentityextension
- v2 endpoints only with mandatory authentication (
-
TFO Custom Components Support: Updated configurations for TFO-Collector OCB-native components
tfootlpreceiver - OTLP with dual v1/v2 endpoint supporttfoexporter - Auto TFO authentication header injectiontfoauthextension - Centralized API key managementtfoidentityextension - Collector identity and resource enrichment
-
Enhanced TFO Exporter Configuration: Multiple dedicated TFO exporter instances
tfo/traces- Trace-specific settings with queue size 2000tfo/metrics- Metrics-specific settings with queue size 1000tfo/logs- Logs-specific settings with queue size 1500- All with gzip compression, retry policies, and sending queues
-
Default SDK Configuration: Added
configs/sdk-default.yaml- Full configuration with all TFO v2 API settings
- Environment variable substitution support
- Collector identity, batching, retry, and gRPC settings
- Production-ready defaults with sensible values
-
V2-Only SDK Configuration: Added
configs/sdk-v2-only.yaml- TFO v2-only mode with mandatory authentication
- Production-optimized settings (compression, larger batches)
- Enhanced gRPC buffer and message sizes
- Complete collector identity configuration
-
Minimal SDK Configuration: Added
configs/sdk-minimal.yaml- Quick-start configuration with essential settings only
- Service name, credentials, and endpoint
- All signals enabled with TFO v2 API
-
Updated .env.example: Enhanced with TFO v2 API environment variables
- TFO v2 API settings:
TELEMETRYFLOW_USE_V2_API,TELEMETRYFLOW_V2_ONLY - Collector identity:
TELEMETRYFLOW_COLLECTOR_NAME,TELEMETRYFLOW_DATACENTER - Protocol and retry settings
- Batch and signal configuration
- TFO v2 API settings:
-
HTTP Exporters: Updated to use configurable URL paths
otlptracehttp.WithURLPath(config.TracesEndpoint())otlpmetrichttp.WithURLPath(config.MetricsEndpoint())
-
Builder Defaults: Updated default values
useV2API: true- v2 API enabled by defaultenrichResources: true- Resource enrichment enabled by defaultdatacenter: "default"- Default datacenter value
-
AutoConfiguration: Extended to include new environment variables
WithCollectorNameFromEnv()added to auto-configuration chainWithDatacenterFromEnv()added to auto-configuration chain
-
Docker Compose: Updated for TFO-Collector v1.1.2 OCB-native architecture
- Unified binary name:
tfo-collector(no more-ocbsuffix) - Updated configuration mounts for new TFO config files
- Short flag support:
-cfor config,-sfor set,-ffor feature-gates
- Unified binary name:
-
OTEL Collector Configs: Updated to align with OTEL 0.142.0
- Updated
configs/otel-collector.yamlwith latest best practices - Added
configs/otel-collector-minimal.yamlfor quick start scenarios
- Updated
-
Domain Config Tests: Added TFO v2 API test cases
TestTelemetryConfig_V2APIDefaultsTestTelemetryConfig_WithV2APITestTelemetryConfig_WithV2OnlyTestTelemetryConfig_WithCustomEndpointsTestTelemetryConfig_CollectorIdentityDefaultsTestTelemetryConfig_WithCollectorNameTestTelemetryConfig_WithCollectorDescriptionTestTelemetryConfig_WithCollectorHostnameTestTelemetryConfig_WithCollectorTagsTestTelemetryConfig_WithEnrichResourcesTestTelemetryConfig_WithDatacenterTestTelemetryConfig_TFOv2FullChaining
-
Builder Tests: Added TFO v2 API builder test cases
TestBuilder_WithV2APITestBuilder_WithV2OnlyTestBuilder_WithCustomEndpointsTestBuilder_WithCollectorNameTestBuilder_WithCollectorNameFromEnvTestBuilder_WithCollectorDescriptionTestBuilder_WithCollectorHostnameTestBuilder_WithCollectorTagsTestBuilder_WithEnrichResourcesTestBuilder_WithDatacenterTestBuilder_WithDatacenterFromEnvTestBuilder_TFOv2FullChaining
-
Benchmarks: Added TFO v2 benchmark
BenchmarkBuilder_BuildWithTFOv2
- Updated configuration documentation for TFO-Collector v1.1.2
- Added TFO v2 endpoint usage examples with authentication headers
- Added TFO custom components reference table
- TFO-Collector: v1.1.2 (OCB-native)
- OpenTelemetry Collector: v0.142.0
- OpenTelemetry Go SDK: v1.39.0
1.1.1 - 2024-12-30
- Dual Endpoint Ingestion Support: Updated docker-compose and OTEL collector configs for TFO-Collector dual ingestion
- v1 endpoints: Standard OTEL community format (
/v1/traces,/v1/metrics,/v1/logs) - v2 endpoints: TelemetryFlow enhanced format (
/v2/traces,/v2/metrics,/v2/logs) - gRPC endpoint: Same port (4317) for both v1 and v2
- v1 endpoints: Standard OTEL community format (
- TFO-Collector as Default: Docker-compose now uses
telemetryflow/telemetryflow-collectoras default image- Commented alternatives for TFO-Collector-OCB and OTEL Collector Contrib
- Separate volume mounts for each collector type
- Enhanced Port Configuration: Added additional ports for observability
- zPages (55679) for debugging
- pprof (1777) for profiling
- Prometheus exporter (8889)
- Connectors for Exemplars: Added spanmetrics and servicegraph connectors
- Metrics-to-traces correlation with exemplars enabled
- Service dependency graph generation
- Comprehensive Unit Tests: Added unit tests for all DDD layers following external test package pattern
tests/unit/domain/- Credentials and Config domain teststests/unit/application/- Command and Query teststests/unit/infrastructure/- Template, HTTP, Database teststests/unit/client/- Client and Builder teststests/unit/generator/- Generator and REST API generator teststests/unit/version/- Version information teststests/unit/banner/- Banner display tests
- Documentation: Updated docs structure to match TelemetryFlow Collector format
- Added
docs/README.md- Documentation index - Added
docs/TESTING.md- Comprehensive testing guide - Added
docs/BUILD-SYSTEM.md- Build system documentation - Updated
docs/ARCHITECTURE.md- Added version header and DDD layer details
- Added
- Linting: Fixed ST1000 package comment errors for test packages
- Test Utils: Changed from
os.Setenv/os.Unsetenvtot.Setenvfor proper test cleanup
1.1.0 - 2024-12-27
-
Exemplars Support: Enabled by default for metrics-to-traces correlation
- New
WithExemplars(bool)builder method - New
IsExemplarsEnabled()config getter - Compatible with OTEL Collector spanmetrics connector
- New
-
Service Namespace: Support for multi-tenant service organization
- New
WithServiceNamespace(string)builder and config method - New
WithServiceNamespaceFromEnv()builder method - New
ServiceNamespace()config getter - Environment variable:
TELEMETRYFLOW_SERVICE_NAMESPACE - Default value:
telemetryflow - Added to OTLP resource using semconv
service.namespace
- New
-
Collector ID: Unique identifier for TelemetryFlow collector authentication
- New
WithCollectorID(string)builder and config method - New
WithCollectorIDFromEnv()builder method - New
CollectorID()config getter - Environment variable:
TELEMETRYFLOW_COLLECTOR_ID - Added
X-TelemetryFlow-Collector-IDheader to OTLP exports
- New
-
TelemetryFlow Custom Headers: Enhanced authentication headers
X-TelemetryFlow-Key-ID: API Key ID headerX-TelemetryFlow-Key-Secret: API Key Secret headerX-TelemetryFlow-Collector-ID: Collector identifier header- Headers added to both gRPC metadata and HTTP headers
-
Enhanced gRPC Configuration:
- New
GRPCKeepaliveConfigstruct with Time, Timeout, PermitWithoutStream WithGRPCKeepalive(time, timeout, permitWithoutStream)config methodWithGRPCBufferSizes(readSize, writeSize)config methodWithGRPCMessageSizes(recvSize, sendSize)config method- New getters:
GRPCKeepalive(),GRPCMaxRecvMsgSize(),GRPCMaxSendMsgSize(),GRPCReadBufferSize(),GRPCWriteBufferSize() - Default settings aligned with OTEL Collector configuration
- New
- Connectors Support: Added
spanmetricsandservicegraphconnectors for:- Deriving metrics from traces with exemplars support
- Building service dependency graphs automatically
- Metrics-to-traces correlation for drill-down analysis
- Environment Variable Support: Full support for
TELEMETRYFLOW_*environment variables in configuration templates - TelemetryFlow Extensions: Custom
telemetryflow:andcollector:sections for standalone build authentication
- New
otel-collector.yaml.tpltemplate replacingocb-collector.yaml.tpl - Updated
tfo-collector.yaml.tplwith standard OTEL format (removed customenabledflags) - Added connector pipelines:
metrics/spanmetricsandmetrics/servicegraph - OpenMetrics support with
enable_open_metrics: truefor exemplars in Prometheus
-
Default Configuration: Updated defaults to align with TelemetryFlow Collector
- gRPC keepalive: 10s time, 5s timeout
- gRPC buffer sizes: 512KB read/write
- gRPC message sizes: 4 MiB max recv/send
- Exemplars enabled by default
- Service namespace defaults to "telemetryflow"
-
Resource Attributes: Service namespace now added to OTLP resource
- Uses OpenTelemetry semconv
service.namespaceattribute
- Uses OpenTelemetry semconv
-
AutoConfiguration: Extended to include new environment variables
- Now reads
TELEMETRYFLOW_SERVICE_NAMESPACE - Now reads
TELEMETRYFLOW_COLLECTOR_ID
- Now reads
- Configuration Format: Migrated from custom format with
enabledflags to standard OTEL format- Old:
enabled: true/falseflags throughout config - New: Comment out sections to disable (standard OTEL approach)
- Old:
- Template Renamed:
ocb-collector.yaml.tpl→otel-collector.yaml.tpl - Exporter Renamed:
loggingexporter →debugexporter (standard OTEL naming) - Pipeline Structure: Moved from
pipelines:at root toservice.pipelines:
- Updated
configs/otel-collector.yamlwith connectors and new telemetry format - Updated
tests/e2e/testdata/otel-collector.yamlwith memory limiter and new format - Updated batch processor settings:
timeout: 200ms,send_batch_size: 8192 - Updated telemetry format to use
service.telemetry.metrics.readers
- Trace Exporter: Fixed issue where spans were not being properly exported
- StartSpanDirect now correctly returns OpenTelemetry span IDs
- Resolved "span-id-placeholder" issue in v1.0.x
- OpenTelemetry Go SDK: v1.39.0 (latest stable)
- OpenTelemetry Exporters: v1.39.0
- gRPC: v1.77.0
- Compatible with OTEL Collector Contrib v0.142.0
- Removed
ocb-collector.yaml.tpl(replaced byotel-collector.yaml.tpl) - Removed
otel-collector-config.yaml.tpl(duplicate file) - Removed custom
enabledflags from all configuration templates
Configuration Format Changes:
# Old format (1.0.x) - Custom with enabled flags
receivers:
otlp:
enabled: true # No longer supported
protocols:
grpc:
enabled: true # No longer supported
endpoint: "0.0.0.0:4317"
exporters:
logging: # Renamed
enabled: true
loglevel: "info"
pipelines: # Moved under service
metrics:
receivers: [otlp]
exporters: [logging]
# New format (1.1.0) - Standard OTEL
receivers:
otlp:
protocols:
grpc:
endpoint: "0.0.0.0:4317"
exporters:
debug: # Standard OTEL naming
verbosity: detailed
service:
pipelines: # Under service section
metrics:
receivers: [otlp]
exporters: [debug]New Connectors (Optional):
connectors:
spanmetrics:
exemplars:
enabled: true
servicegraph:
store:
ttl: 2s
service:
pipelines:
traces:
exporters: [debug, spanmetrics, servicegraph]
metrics/spanmetrics:
receivers: [spanmetrics]
exporters: [prometheus]1.0.1 - 2024-12-23
- Multi-stage
Dockerfilefor building SDK generators with minimal image size docker-compose.ymlfor development environment with:- OpenTelemetry Collector
- Jaeger (tracing)
- Prometheus (metrics)
- Grafana (visualization)
docker-compose.e2e.ymlfor end-to-end testing infrastructure with:- OTEL Collector for telemetry
- Mock backend (nginx)
- Jaeger for trace visualization
- PostgreSQL for integration tests
- Redis for caching tests
- Mermaid diagrams added to all documentation files:
ARCHITECTURE.md: SDK layer diagram, telemetry flow, and component relationshipsAPI_REFERENCE.md: Package overview diagramQUICKSTART.md: SDK initialization sequence diagramGENERATOR.md: Command flow and telemetry integration diagramsGENERATOR_RESTAPI.md: DDD architecture and CQRS pattern diagrams
- New documentation file:
GENERATOR_RESTAPI.md- comprehensive RESTful API generator docs
- Unit tests for infrastructure layer:
template_test.go: Template functions and execution testsconfig_test.go: Configuration file handling testshttp_test.go: HTTP middleware and response pattern testsdatabase_test.go: Database configuration and query pattern tests
- E2E test data files:
otel-collector.yaml: OpenTelemetry Collector configurationnginx.conf: Mock backend configurationmock-responses/health.json: Health check response fixture
- Comprehensive test fixtures package (
tests/fixtures/):credentials.go: Valid/invalid API key scenariosconfig.go: SDK configuration test datatelemetry.go: Sample metrics, logs, and traces fixturestemplates.go: Code generator template test dataresponses.go: Mock HTTP/OTLP response fixturesfixtures.go: Helper functions for loading fixtures
- Added TelemetryFlow SDK logos with dark/light theme support:
docs/assets/tfo-logo-sdk-dark.svgdocs/assets/tfo-logo-sdk-light.svg
configs/otel-collector.yaml: Production-ready OTEL Collector configurationconfigs/prometheus.yaml: Prometheus scrape configuration
- Updated Go version requirement from 1.21 to 1.24 in README badges
- Expanded README features list to include:
- Docker support
- RESTful API generator
- E2E testing infrastructure
- Enhanced README with Docker and Docker Compose usage sections
- Updated documentation links in README
- Improved ASCII diagrams converted to Mermaid for better rendering on GitHub
- Fixed test assertion for default endpoint in
builder_test.go(.io→.id)
1.0.0 - 2024-12-01
telemetryflow.Client: Main SDK client for telemetry operationstelemetryflow.NewFromEnv(): Environment-based client initializationtelemetryflow.NewBuilder(): Builder pattern for client configuration
Credentials: Immutable API key pair value object with validationTelemetryConfig: Aggregate root for SDK configuration- Support for gRPC and HTTP OTLP protocols
- Commands:
RecordMetricCommand,EmitLogCommand,StartSpanCommand,EndSpanCommand - Queries:
GetMetricQuery,GetLogsQuery,GetTraceQuery - Command and Query bus implementations
OTLPExporterFactory: Creates OTLP exporters for metrics, logs, and tracesTelemetryCommandHandler: Handles telemetry commands- OpenTelemetry SDK integration with automatic batching
IncrementCounter(): Counter metric recordingRecordGauge(): Gauge metric recordingRecordHistogram(): Histogram metric recording with units
LogInfo(),LogWarn(),LogError(),LogDebug(): Structured logging at various levels- Attribute support for log enrichment
StartSpan(): Create new spans with attributesEndSpan(): Complete spans with optional error statusAddSpanEvent(): Add events to active spans- Context propagation support
init: Initialize TelemetryFlow integration in projectsexample: Generate example code (http-server, worker, grpc-server, basic)config: Generate configuration filesversion: Display version information- Custom template support with
--template-dir
new: Create complete DDD + CQRS RESTful API projectsentity: Generate entities with repository, handlers, and migrationsdocs: Regenerate API documentation- Echo framework integration
- OpenAPI/Swagger documentation generation
- Postman collection generation
- JWT authentication middleware
- CORS and rate limiting middleware
- PostgreSQL, MySQL, and SQLite support
- Environment variable support (
TELEMETRYFLOW_*) .env.telemetryflowconfiguration file support- Protocol selection (gRPC/HTTP)
- Retry configuration with exponential backoff
- Batch settings customization
- Signal control (metrics, logs, traces)
- Custom resource attributes
ARCHITECTURE.md: SDK architecture with DDD/CQRS patternsAPI_REFERENCE.md: Complete API documentationQUICKSTART.md: Getting started guideGENERATOR.md: SDK generator documentation- Example applications in
examples/directory
The 1.0.0 release is a complete rewrite with breaking changes:
-
Client Initialization:
// Old (0.x) client := telemetryflow.NewClient(config) // New (1.0.0+) client, err := telemetryflow.NewFromEnv() // or client := telemetryflow.NewBuilder(). WithAPIKey("key", "secret"). MustBuild()
-
Metric Recording:
// Old (0.x) client.RecordMetric("name", value, tags) // New (1.0.0+) client.IncrementCounter(ctx, "name", value, attributes) client.RecordHistogram(ctx, "name", value, "unit", attributes)
-
Logging:
// Old (0.x) client.Log(level, message, fields) // New (1.0.0+) client.LogInfo(ctx, message, attributes) client.LogError(ctx, message, attributes)
-
Tracing:
// Old (0.x) span := client.StartTrace("name") defer span.End() // New (1.0.0+) spanID, _ := client.StartSpan(ctx, "name", "kind", attrs) defer client.EndSpan(ctx, spanID, nil)
None at this time.
- DevOpsCorner Indonesia Team