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

Improved aqua telemetry #995

Merged
merged 4 commits into from
Nov 12, 2024
Merged

Improved aqua telemetry #995

merged 4 commits into from
Nov 12, 2024

Conversation

lu-ohai
Copy link
Member

@lu-ohai lu-ohai commented Nov 7, 2024

Improved aqua telemetry

  • Added more information to telemetry when service error is raised:
    -- aqua api name
    -- oci api name
    -- service endpoint

Results

"userAgent": "value=Authorization+failed+or+requested+resource+not+found.&aqua_api_name=AquaModelHandler.get&oci_api_name=get_model&service_endpoint=GET+https%3A%2F%2Fdatascience-int.us-ashburn-1.oci.oc-test.com%2F20190101%2Fmodels%2Focid1.datasciencemodel.oc1.iad.<id>"

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

github-actions bot commented Nov 7, 2024

📌 Cov diff with main:

Coverage-50%

📌 Overall coverage:

Coverage-58.60%

@lu-ohai lu-ohai changed the title [WIP] Improved aqua telemetry Improved aqua telemetry Nov 8, 2024
@lu-ohai lu-ohai marked this pull request as ready for review November 8, 2024 17:27
Copy link

github-actions bot commented Nov 8, 2024

📌 Cov diff with main:

Coverage-50%

📌 Overall coverage:

Coverage-58.59%

mrDzurb
mrDzurb previously approved these changes Nov 8, 2024
@@ -69,6 +69,12 @@ def inner_function(
reason=error.message,
service_payload=error.args[0] if error.args else None,
exc_info=sys.exc_info(),
aqua_api_details=dict(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: I would rather suggest to use the get operator to extract attributes from error objects.

aqua_api_details = {
        "aqua_api_name": func.__qualname__,
        "oci_api_name": getattr(error, "operation_name", "Unknown Operation"),
        "service_endpoint": getattr(error, "request_endpoint", "Unknown Endpoint")
    }

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just updated

Copy link

github-actions bot commented Nov 9, 2024

📌 Cov diff with main:

Coverage-50%

📌 Overall coverage:

Coverage-58.59%

@lu-ohai lu-ohai merged commit ab684e8 into main Nov 12, 2024
5 of 6 checks passed
Copy link

📌 Cov diff with main:

No lines with coverage information in this diff.

📌 Overall coverage:

Coverage-58.59%

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