Skip to content

[Internal] Add per-resource unified provider telemetry to User-Agent for SDKv2#5461

Draft
tanmay-db wants to merge 4 commits intomainfrom
unified-telemetry
Draft

[Internal] Add per-resource unified provider telemetry to User-Agent for SDKv2#5461
tanmay-db wants to merge 4 commits intomainfrom
unified-telemetry

Conversation

@tanmay-db
Copy link
Contributor

@tanmay-db tanmay-db commented Mar 6, 2026

Changes

  • Adds unifiedprovider/true to the User-Agent header when a user sets provider_config.workspace_id in their Terraform configuration for a SDKv2 resource or data source
  • Uses useragent.InContext (per-request context), so only API calls from resources where the user has configured provider_config include the tag — all other resources are
    unaffected

Tests

  • TestAddUnifiedProviderContext_WithProviderConfig — unifiedprovider/true present when user sets workspace_id in their config
  • TestAddUnifiedProviderContext_WithoutProviderConfig — absent when user does not set provider_config
  • TestAddUnifiedProviderContext_WithEmptyWorkspaceID — absent when user sets workspace_id to empty string
  • All existing context and unified provider tests pass

@tanmay-db tanmay-db temporarily deployed to test-trigger-is March 6, 2026 23:21 — with GitHub Actions Inactive
@tanmay-db tanmay-db temporarily deployed to test-trigger-is March 6, 2026 23:21 — with GitHub Actions Inactive
@tanmay-db tanmay-db temporarily deployed to test-trigger-is March 6, 2026 23:22 — with GitHub Actions Inactive
@tanmay-db tanmay-db changed the title [Internal] [Internal] Add per-resource unified provider telemetry to User-Agent for SDKv2 Mar 6, 2026
@tanmay-db tanmay-db temporarily deployed to test-trigger-is March 6, 2026 23:44 — with GitHub Actions Inactive
@tanmay-db tanmay-db temporarily deployed to test-trigger-is March 6, 2026 23:44 — with GitHub Actions Inactive
@tanmay-db tanmay-db temporarily deployed to test-trigger-is March 6, 2026 23:44 — with GitHub Actions Inactive
@tanmay-db tanmay-db temporarily deployed to test-trigger-is March 6, 2026 23:45 — with GitHub Actions Inactive
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/terraform

Inputs:

  • PR number: 5461
  • Commit SHA: 3e284dd92d7265e78a2aab7c8993578f21c81a4a

Checks will be approved automatically on success.

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.

1 participant