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

TelemetryClient constructor taking instrumentation key? #7

Closed
zooba opened this issue Jan 15, 2015 · 2 comments
Closed

TelemetryClient constructor taking instrumentation key? #7

zooba opened this issue Jan 15, 2015 · 2 comments
Assignees

Comments

@zooba
Copy link
Member

zooba commented Jan 15, 2015

It would be nice to be able to construct a TelemetryClient with just a key, rather than having to remember about setting it via context.

tc = TelemetryClient('12345678-1234-1234-1234567890')

Since the first parameter can currently only be a TelemetryChannel, it seems easy enough to test for that type.

Maybe there's some reason why it makes sense to disallow this, but I can't think of it myself.

@BogdanBe BogdanBe self-assigned this Jan 21, 2015
@BogdanBe
Copy link

The instrumentation key is always required so there is no good reason why we would want to create a client that doesn't have have one. As such we will add an additional (required) parameter to the ctor of TelemetryClient

To maintain (some) backwards compatibility cases, we will test the first parameter for the TelemetryChannel type and we will not raise an exception in this case.

@BogdanBe
Copy link

Fixed in #9

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

No branches or pull requests

2 participants