-
Notifications
You must be signed in to change notification settings - Fork 46
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
Adds typespec-azure-telemetry package #2156
base: main
Are you sure you want to change the base?
Conversation
All changed packages have been documented.
Show changes
|
You can try these changes here
|
@@ -0,0 +1,7 @@ | |||
--- | |||
changeKind: feature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changeKind: feature | |
changeKind: internal |
Just as it will show up in the following version otherwise
@@ -0,0 +1,31 @@ | |||
import { ExtensionConfig } from "../reporters/types.js"; | |||
|
|||
export function getFetchHttpOverride(): ExtensionConfig["httpXHROverride"] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whats the reason for those overrides, can add a comment?
import * as https from "https"; | ||
import { ExtensionConfig } from "../reporters/types.js"; | ||
|
||
export function getNodeHttpOverride(): ExtensionConfig["httpXHROverride"] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
|
||
const appInsightsClient = getAppInsightsClient({ | ||
instrumentationKey: props.instrumentationKey, | ||
httpXHROverride: supportsFetch() ? getFetchHttpOverride() : getNodeHttpOverride(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't we always have fetch? compiler depends on it too
|
||
Telemetry collection is on by default. | ||
|
||
To opt out, set the environment variable `DISABLE_TYPESPEC_AZURE_TELEMETRY` to a truthy value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can add basic docs on how to use this package?
} catch { | ||
// ignore error | ||
} | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens if it errors out? no session id or empty id?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No sessionId in that case. It will still show up in app insights, but each event will be treated as being part of their own session.
That said - this file is mostly inconsequential for now since we'll use the NoOpTelemetryReporter in browser builds.
No description provided.