GoogleCloudPlatform / GoogleCloudPlatform/spring-cloud-gcp

Make user agent reporting more specific to type of integration

Open
#655 1 comment 0 reactions 0 assignees View on GitHub
priority: p3 pubsub type: enhancement
Dominant language
Java
Stars
551
Forks
349
Avg merge
1d 13h
Merged PRs (30d)
14

Description

PubSub currently creates a single instance of the [UserAgentHeaderProvider](https://github.com/GoogleCloudPlatform/spring-cloud-gcp/blob/19c1034428d676a0a5d55abbee8181ae104492b1/spring-cloud-gcp-autoconfigure/src/main/java/com/google/cloud/spring/autoconfigure/pubsub/GcpPubSubAutoConfiguration.java#L104) and sets it in DefaultSubscriberFactory.

For Spring Integration, we will need to create another instance if UserAgentHeaderProvider and pass it in as input to `this.pubSubSubscriberOperations.subscribeAndConvert()` in PubSubInboundChannelAdapter.

For Cloud Stream, we will need to add a setter for user agent provider in PubSubInboundChannelAdapter. In [PubSubMessageChannelBinder](https://github.com/GoogleCloudPlatform/spring-cloud-gcp/blob/19c1034428d676a0a5d55abbee8181ae104492b1/spring-cloud-gcp-pubsub-stream-binder/src/main/java/com/google/cloud/spring/stream/binder/pubsub/PubSubMessageChannelBinder.java#L47), we can use this setter to set the user agent for Cloud Stream.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.