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

swatch-2084: update eventController to set the azure billingAccountId #2990

Merged

Conversation

kflahert
Copy link
Contributor

Jira issue: SWATCH-2084

Description

Need to set the billingAccountId for azure events by using the fields azure_tenant_id and azure_subscription_id from cost-mgmt.

Testing

Setup

  1. Start app w/: DEV_MODE=true ./gradlew :bootRun

Steps

  1. Put message on topic platform.rhsm-subscriptions.service-instance-ingress:
    {"sla": "Premium", "role": "Red Hat Enterprise Linux Server", "usage": "Production", "org_id": "org_123", "event_id": "3d363cc8-b2bc-4230-a943-638a4822da70", "timestamp": "2024-01-21T22:00:00Z", "event_type": "snapshot", "expiration": "2024-01-21T23:00:00Z", "instance_id": "test", "product_ids": ["69", "204"], "product_tag": ["rhel-for-x86-els-payg"], "event_source": "cost-management", "measurements": [{"uom": "vCPUs", "value": 1.0}], "service_type": "RHEL System", "hardware_type": "Cloud", "cloud_provider": "Azure", "azure_tenant_id": "testTenantId", "billing_provider": "azure", "azure_subscription_id": "testSubscriptionId"}

Verification

  1. Check event for billing_account_id = "testTenantId;testSubscriptionId":
    select * from events where org_id = 'org_123';

@TrayvonMcKnight TrayvonMcKnight self-requested a review January 23, 2024 21:48
Copy link
Contributor

@TrayvonMcKnight TrayvonMcKnight left a comment

Choose a reason for hiding this comment

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

The kafka message was able to be processed and resulted in the the entry below.

https://docs.google.com/document/d/1YEnOVphMAjskVWQh-g_WNav47FLtRABhNM0gOnxrRRA/edit?usp=sharing

Copy link
Contributor

@Sgitario Sgitario left a comment

Choose a reason for hiding this comment

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

just a minor suggestion, otherwise lgtm!

Co-authored-by: Jose Carvajal <[email protected]>
@kflahert kflahert merged commit f0bdef8 into main Jan 24, 2024
1 of 2 checks passed
@kflahert kflahert deleted the kflahert/swatch-2084-update-azure-events-from-cost-mgmt branch January 24, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants