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

Opentelemetry Logs #3440

Open
uptickmetachu opened this issue Sep 26, 2024 · 2 comments
Open

Opentelemetry Logs #3440

uptickmetachu opened this issue Sep 26, 2024 · 2 comments
Labels
enhancement New feature or request needs design We need to flesh out the design before we can resolve the issue

Comments

@uptickmetachu
Copy link

Describe the enhancement

Add support for opentelemetry logs.

Traces are very helpful but it would be even better if we can also view the logs for a specific trace / module execution.

@uptickmetachu uptickmetachu added the enhancement New feature or request label Sep 26, 2024
@yhakbar
Copy link
Collaborator

yhakbar commented Oct 15, 2024

Hey @uptickmetachu ,

This seems like a very sensible ask. Do you mind providing more context in the form of design considerations? What would need to be done, in your mind, to have this enhancement delivered?

@yhakbar yhakbar added the needs design We need to flesh out the design before we can resolve the issue label Oct 15, 2024
@uptickmetachu
Copy link
Author

Terraform and opentofu both support json logging
https://opentofu.org/docs/internals/debugging/
https://developer.hashicorp.com/terraform/internals/debugging

What I envision is the terragrunt process captures the json log outputs from opentofu and terraform and inject extra tracing metadata such as:

  • trace_parent
  • service_name: terragrunt (or configurable via environment variable)
  • span_attributes.terragrunt.module.path: Path of the terragrunt module relative to root path
  • span_attributes.terraform.command: (plan | apply | info | etc)

The end goal would be able to see all the logs of a terragrunt apply-all or of individual runs.

A user should be able to find logs for all terraform applys to an individual module (for auditing / debugging)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs design We need to flesh out the design before we can resolve the issue
Projects
None yet
Development

No branches or pull requests

2 participants