Skip to content

Commit f81fd7a

Browse files
authored
Marking instanaexporter module as deprecated (#35052)
**Description:** <Describe what has changed.> Follow #18503, Marking instanaexporter module as deprecated. **Link to tracking Issue:** #34994 **Testing:** <Describe what testing was performed and which tests were added.> **Documentation:** <Describe the documentation added.> Signed-off-by: Murphy Chen <[email protected]>
1 parent 5e26464 commit f81fd7a

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: deprecation
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: instanaexporter
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Marking instanaexporter module as deprecated
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [34994]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: []

exporter/instanaexporter/factory.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ package instanaexporter // import "github.com/open-telemetry/opentelemetry-colle
77

88
import (
99
"context"
10+
"sync"
1011
"time"
1112

1213
"go.opentelemetry.io/collector/component"
@@ -16,10 +17,13 @@ import (
1617
"go.opentelemetry.io/collector/consumer"
1718
"go.opentelemetry.io/collector/exporter"
1819
"go.opentelemetry.io/collector/exporter/exporterhelper"
20+
"go.uber.org/zap"
1921

2022
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter/internal/metadata"
2123
)
2224

25+
var once sync.Once
26+
2327
// NewFactory creates an Instana exporter factory
2428
func NewFactory() exporter.Factory {
2529
return exporter.NewFactory(
@@ -41,13 +45,20 @@ func createDefaultConfig() component.Config {
4145
}
4246
}
4347

48+
func logDeprecation(logger *zap.Logger) {
49+
once.Do(func() {
50+
logger.Warn("instana exporter is deprecated and will be removed in the next release. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/34994 for more details.")
51+
})
52+
}
53+
4454
// createTracesExporter creates a trace exporter based on this configuration
4555
func createTracesExporter(ctx context.Context, set exporter.Settings, config component.Config) (exporter.Traces, error) {
4656
cfg := config.(*Config)
4757

4858
ctx, cancel := context.WithCancel(ctx)
4959

5060
instanaExporter := newInstanaExporter(cfg, set)
61+
logDeprecation(set.Logger)
5162

5263
return exporterhelper.NewTracesExporter(
5364
ctx,

exporter/instanaexporter/go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Deprecated: [v0.109.0] This package is deprecated and will be removed in the next release.
12
module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter
23

34
go 1.22.0

0 commit comments

Comments
 (0)