Skip to content

Conversation

mrDzurb
Copy link
Member

@mrDzurb mrDzurb commented Dec 7, 2023

Description

https://jira.oci.oraclecorp.com/browse/ODSC-38697
Implements Telemetry decorator.

Example Of Usage

class MyModelDeployment:
     
    @telemetry("plugin=mydeployer&action=deploy")
    def deploy(self, name, **kwargs):
           telemetry: Telemetry = kwargs.pop("telemetry", None)
           
           if name=="mymodel":
                 telemetry.add("model=mymodel")
           else:
                telemetry.add("model=notmymodel")
         
           ...
           Call the actual deployment with the appropriate signer.          

The decorator exclusively alters the EXTRA_USER_AGENT_INFO environment variable, which is utilized to construct the additional_user_agent environment variable.

Without the telemetry decorator, we will retain the base telemetry settings as defined in the ads.auth module. The decorator serves the purpose of populating the api section of the telemetry.

Tests

image

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Dec 7, 2023
Copy link

github-actions bot commented Dec 7, 2023

📌 Cov diff with main:

Coverage-75%

📌 Overall coverage:

Coverage-62.14%

@mrDzurb mrDzurb merged commit e8189c5 into main Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants