Skip to content

Commit 065d2a1

Browse files
alexvanboxelvincentfree
authored andcommitted
[receiver/googlecloudpubsub] add deprecation for build-in encoders (open-telemetry#39842)
#### Description Add deprecation warning for the build-in encoders. The build-in encoders `cloud_logging` and `raw_text` both have encoding extension alternatives and will be removed in version v0.132.0 of the collector #### Link to tracking issue Fixes open-telemetry#39371 #### Testing Started the collector with the encoders selected and see the warning #### Documentation Added deprecation to the README
1 parent 669977b commit 065d2a1

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
change_type: deprecation
2+
3+
component: googlecloudpubsubreceiver
4+
5+
note: Add deprecation warning for the build-in encoders
6+
7+
issues: [39371]
8+
9+
subtext: |
10+
The build-in encoders `cloud_logging` and `raw_text` both have encoding extension alternatives and will be removed
11+
in version v0.132.0 of the collector.
12+
13+
change_logs: [user]

receiver/googlecloudpubsubreceiver/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,12 @@ Extensions. The non OTLP build in encodings will be deprecated as soon as extens
7777
| raw_text | Wrap in an OTLP log message |
7878

7979
With `cloud_logging`, the receiver can be used to bring Cloud Logging messages into an OpenTelemetry pipeline. You'll
80-
first need to [set up a logging sink][sink-docs] with a Pub/Sub topic as its destination. Note that the `cloud_logging`
81-
integration is considered **alpha** as the semantic convention on some of the conversion are not stabilized yet.
80+
first need to [set up a logging sink][sink-docs] with a Pub/Sub topic as its destination. The build-in encoding is
81+
**deprecated** and will be removed in v0.132.0: Use the `googlecloudlogentry` encoding extension instead.
8282

8383
With `raw_text`, the receiver can be used for ingesting arbitrary text message on a Pubsub subscription, wrapping them
84-
in OTLP Log messages.
84+
in OTLP Log messages. The build-in encoding is **deprecated** and will be removed in v0.132.0: Use the `text` encoding
85+
extension instead.
8586

8687
When no encoding is specified, the receiver will try to discover the type of the data by looking at the `ce-type` and
8788
`content-type` attributes of the message. These message attributes are set by the `googlepubsubexporter`.

receiver/googlecloudpubsubreceiver/receiver.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,10 @@ func (receiver *pubsubReceiver) setMarshallerFromEncodingID(encodingID buildInEn
183183
case otlpProtoLog:
184184
receiver.logsUnmarshaler = &plog.ProtoUnmarshaler{}
185185
case rawTextLog:
186+
receiver.settings.Logger.Warn("build-in raw_text encoding is deprecated and will be removed in v0.132.0, use the text encoding extension instead")
186187
receiver.logsUnmarshaler = unmarshalLogStrings{}
187188
case cloudLogging:
189+
receiver.settings.Logger.Warn("build-in cloud_logging encoding is deprecated and will be removed in v0.132.0, use the googlecloudlogentry encoding extension instead")
188190
receiver.logsUnmarshaler = unmarshalCloudLoggingLogEntry{}
189191
default:
190192
return fmt.Errorf("cannot start receiver: build in encoding %s is not supported for logs", receiver.config.Encoding)

0 commit comments

Comments
 (0)