Skip to content

Conversation

@tanyasethi-msft
Copy link
Member

  • The purpose of this PR is explained in this or a referenced issue.
  • The PR does not update generated files.
  • Tests are included and/or updated for code changes.
  • Updates to module CHANGELOG.md are included.
  • MIT license headers are included in each file.

# Conflicts:
#	sdk/storage/azdatalake/file/client_test.go
# Conflicts:
#	sdk/storage/azdatalake/CHANGELOG.md
#	sdk/storage/azdatalake/internal/exported/version.go
@souravgupta-msft
Copy link
Member

There should ideally be one commit showing here which should be the last one, right?

@tanyasethi-msft tanyasethi-msft requested review from a team and chlowell as code owners January 17, 2024 11:55
@tanyasethi-msft tanyasethi-msft changed the base branch from feature/azdatalake/STG83-90 to main January 17, 2024 11:55
const crc64Polynomial uint64 = 0x9A6C9329AC4BC9B5

const (
AppendBlobClient = "azblob/appendblob.Client"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of [email protected], the moduleName param to azcore.NewClient() takes the full module name instead of the package.ClientName. So, all of these constants can go away.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the three packages are already using [email protected]. What do you mean by full module name?

The context here is that earlier we were passing ModuleName as azblob/service.Client for example to create the azcore client from service client. In the telemetry policy, this is updated to service.Client from this code. This resulted in the user agent string as azsdk-go-service.Client/v1.2.0 (go1.19.3; Windows_NT).

In this PR we are replacing / with . in module name of respective clients which would give the user agent string, azsdk-go-azblob.service/v1.2.0 (go1.19.3; Windows_NT)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fully qualified module name e.g. github.com/Azure/azure-sdk-for-go/sdk/storage/azblob.

Originally, we wanted package.ClientName for use by the tracing policy. We've retooled how tracing works, so passing package.ClientName is no longer necessary.

Regarding the telemetry policy, we don't want/need the client name in the User-Agent string. See the guidelines for the format.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In current implementation, "azsdk-go-service.Client/v1.2.0 (go1.19.3; Windows_NT)" this user-agent string is not able to identify whether request was generated by "blob", "datalake" or "files" client as all three can have service client. Hence we are removing the "/" to include "azblob" or "azdatalake" in the string as well.
For the other part "service.Client" does not make much sense for telemetry in any way. If we are interested in just knowing which module was used then "azblob.service" itself tell the whole story ".client" is not adding any value there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On FE side we are building telemetry to parase the User-Agent string and dump some of the keywords to a dgrep table. Longer the string or more vivid the string, higher resource consumption between FE and XArgus. "azsdk-go-blob" shall be good enough for us to understand what SDK was used. Does Azure-SDK team have any sort of telemetry already built to identify which customers are using what SDK or which clients?

@vibhansa-msft
Copy link
Member

Corrected the chageset in #22273

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants