Skip to content

feat: collect module usage telemetry - #47

Merged
posquit0 merged 1 commit into
mainfrom
feat/module-usage-telemetry
Oct 8, 2026
Merged

posquit0 merged 1 commit into
mainfrom
feat/module-usage-telemetry

Conversation

@posquit0

@posquit0 posquit0 commented Oct 8, 2026

Copy link
Copy Markdown
Member

Summary

Add opt-out module usage telemetry to every module in this repository, using the tedilabs/telemetry provider. This lets us see which modules and versions are actually used, to prioritize improvements.

Modules: enterprise-organization, org-organization, org-ruleset, org-team, project, repository-custom-property, repository-environment, repository, webhook

Changes

  • Add telemetry.tf to every module. The file is identical across modules and adds:
    • A telemetry variable to opt out (enabled) or turn off individual data categories (capture_machine, capture_network, capture_git, capture_github, capture_github_actions, capture_terraform, capture_toolchain). Everything is enabled by default.
    • A check "telemetry" block that calls provider::telemetry::capture_posthog with the module package, version and name from local.metadata. Events are cached and deduplicated per package, version and module.
  • Add tedilabs/telemetry (>= 0.1.1) to required_providers in every versions.tf.
  • Regenerate each module's README.md (new telemetry requirement and input).

Impact on callers

  • terraform init now also installs the tedilabs/telemetry provider. It is required even when telemetry is disabled, so environments using a provider mirror or without internet access need to make it available.
  • To opt out per module call: telemetry = { enabled = false }.
  • Telemetry runs in a check block, so a failed assertion is reported as a warning and does not block plan or apply.

@github-actions github-actions Bot added 💾 enterprise-organization This issue or pull request is related to enterprise-organization module. 💾 org-organization This issue or pull request is related to org-organization module. 💾 org-team This issue or pull request is related to org-team module. 💾 project This issue or pull request is related to project module. 💾 repository This issue or pull request is related to repository module. 💾 webhook This issue or pull request is related to webhook module. 💾 repository-environment This issue or pull request is related to repository-environment module. 💾 repository-custom-property This issue or pull request is related to repository-custom-property module. 💾 org-ruleset This issue or pull request is related to org-ruleset module. labels Oct 8, 2026
@github-actions github-actions Bot added the size/L Large size issue or PR. label Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Terraform Integration

Directory fmt validate tflint docs
modules/enterprise-organization ✅ ✅ ✅ ✅
modules/org-organization ✅ ✅ ✅ ✅
modules/org-ruleset ✅ ✅ ✅ ✅
modules/org-team ✅ ✅ ✅ ✅
modules/project ✅ ✅ ✅ ✅
modules/repository ✅ ✅ ✅ ✅
modules/repository-custom-property ✅ ✅ ✅ ✅
modules/repository-environment ✅ ✅ ✅ ✅
modules/webhook ✅ ✅ ✅ ✅

✅ All 9 passed.

@posquit0
posquit0 merged commit 684ddec into main Oct 8, 2026
15 checks passed
@posquit0
posquit0 deleted the feat/module-usage-telemetry branch October 8, 2026 08:41
@tedilabs-release tedilabs-release Bot mentioned this pull request Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💾 enterprise-organization This issue or pull request is related to enterprise-organization module. 💾 org-organization This issue or pull request is related to org-organization module. 💾 org-ruleset This issue or pull request is related to org-ruleset module. 💾 org-team This issue or pull request is related to org-team module. 💾 project This issue or pull request is related to project module. 💾 repository This issue or pull request is related to repository module. 💾 repository-custom-property This issue or pull request is related to repository-custom-property module. 💾 repository-environment This issue or pull request is related to repository-environment module. 💾 webhook This issue or pull request is related to webhook module. size/L Large size issue or PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant