Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service name not respected #159

Closed
btrautmann opened this issue Jul 5, 2022 · 5 comments · Fixed by #160
Closed

Service name not respected #159

btrautmann opened this issue Jul 5, 2022 · 5 comments · Fixed by #160
Assignees
Labels
bug Something isn't working

Comments

@btrautmann
Copy link

Thanks for taking the time for reporting an issue!

Describe what happened
We're noticing that the service name passed to the DdSdkConfiguration constructor is not respected, and the resulting service name ends up being the application's package name.

Steps to reproduce the issue:

Build an app using the plugin on Android and pass serviceName as foo to the aforementioned constructor, and initialize the SDK. When querying in Datadog, this service name does not show up but the application id (e.g com.application) does.

    final datadogConfiguration = DdSdkConfiguration(
      clientToken: _clientToken,
      serviceName: 'mobile', // This ends up being application ID on backend
      env: appConfiguration.environmentString,
      trackingConsent: TrackingConsent.granted,
      site: DatadogSite.us1,
    )..additionalConfig.addAll(additionalConfig);

    await _datadogSdk.initialize(datadogConfiguration);

Describe what you expected:

The serviceName passed to the constructor should be respected/persisted on the underlying native SDK.

Additional context

  • Dart/Flutter version: Flutter (Channel stable, 2.10.4, on macOS 12.4 21F79 darwin-arm, locale en-US), Dart version 2.16.2
  • Android/iOS OS version: Android 9
  • Device Model: Moto X4
  • Datadog SDK version: 1.0.0-beta.2
  • Versions of any other relevant dependencies: N/A
@btrautmann btrautmann added the bug Something isn't working label Jul 5, 2022
@btrautmann
Copy link
Author

I'll work on verifying the same behavior occurs on iOS.

@fuzzybinary
Copy link
Member

Hi @btrautmann,

Thanks for reporting this!

It looks like when I performed a refactor to support Web, I accidentally stopped sending the serviceName down to native mobile. I'm verifying it is indeed broken on both platforms, but from looking at the refactor it appears it will be.

Is this blocking any work on your side or will it prevent integration?

@fuzzybinary fuzzybinary self-assigned this Jul 6, 2022
@btrautmann
Copy link
Author

Is this blocking any work on your side or will it prevent integration?

Thankfully it's not a blocker, since we're currently using the existing community supported plugin, but this blocks us from migrating to the first party supported plugin, since we want to keep the serviceName consistent during the migration.

@fuzzybinary
Copy link
Member

This is now fixed and deployed in 1.0.0-beta.3

@btrautmann
Copy link
Author

I verified this is working in 1.0.0-beta.3. Thanks @fuzzybinary!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants