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

Set Client User Agent Property to allow comlink usage tracking #84

Closed
ayyrickay opened this issue Feb 16, 2022 · 2 comments · Fixed by #112 or #116
Closed

Set Client User Agent Property to allow comlink usage tracking #84

ayyrickay opened this issue Feb 16, 2022 · 2 comments · Fixed by #112 or #116
Labels
enhancement New feature or request

Comments

@ayyrickay
Copy link
Collaborator

ayyrickay commented Feb 16, 2022

const client = new Twilio(apiKey, apiSecret, {accountSid: '...', userAgentExtensions: ['@twilio-labs/plugin-dev-phone/1.0.0']})

const client = new Twilio(apiKey, apiSecret, {accountSid: '...', userAgentExtensions: ['@twilio-labs/plugin-dev-phone/1.0.0', 'dev-phone-headless']})

We can set this up to consume an array of tags - so there may be different modes that we want to support in the future, like Headless and Functions.

Note that this needs to be implemented with Functions as well as the extension client itself. Those should have separate tracking, because they can tell us different info (functions for Usage, extension for number of setups - interesting ratio!)

Example of implementation here: https://github.com/twilio-labs/twilio-firebase-extensions/blob/main/send-message/functions/src/utils.ts#L22-L24

@ayyrickay ayyrickay added the enhancement New feature or request label Feb 16, 2022
@ayyrickay ayyrickay reopened this Mar 11, 2022
@ayyrickay
Copy link
Collaborator Author

Leaving this open because we still need to implement tracking in the dev phone client's requests

@ayyrickay
Copy link
Collaborator Author

    // TODO: something like this.twilioClient.userAgentExtensions = [ARRAY_OF_HEADER_STRINGS]

Can put this in dev-phone.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant