- `extension/xextension`: Add deprecated type alias support for extensions via `xextension` module (#14208)
Extensions can now register deprecated type aliases using the experimental `xextension.WithDeprecatedTypeAlias` option.
```go
return xextension.NewFactory(
metadata.Type,
createDefaultConfig,
createExtension,
metadata.Stability,
xextension.WithDeprecatedTypeAlias("old_extension_name"),
)
```
When the alias is used in configuration, a deprecation warning will be automatically logged, and the extension will function normally using the original implementation.
- `all`: Add support for deprecated component type aliases (#14208)
To add a deprecated type alias to a component factory, use the `WithDeprecatedTypeAlias` option.
```go
return xexporter.NewFactory(
metadata.Type,
createDefaultConfig,
xexporter.WithTraces(createTracesExporter, metadata.TracesStability),
xexporter.WithDeprecatedTypeAlias("old_component_name"),
)
```
When the alias is used in configuration, a deprecation warning will be automatically logged, and the component will function normally using the original implementation.github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.144.0