Repository: opentofu/opentofu
File: internal/tracing/traceattrs/opentofu.go (Go)

Code before:

// OpenTofuOCIReferenceTag returns an attribute definition for indicating
// which OCI repository tag is relevant to a particular trace span.
func OpenTofuOCIReferenceTag(name string) attribute.KeyValue {
	return attribute.String("opentofu.oci.reference.tag", name)
}

// OpenTofuOCIReferenceDigest returns an attribute definition for indicating
// which OCI digest reference is relevant to a particular trace span.
func OpenTofuOCIReferenceDigest(digest string) attribute.KeyValue {
	return attribute.String("opentofu.oci.reference.digest", digest)
}

// OpenTofuOCIManifestMediaType returns an attribute definition for indicating
// which OCI manifest media type is relevant to a particular trace span.
func OpenTofuOCIManifestMediaType(typ string) attribute.KeyValue {
	return attribute.String("opentofu.oci.manifest.media_type", typ)
}

// OpenTofuOCIManifestArtifactType returns an attribute definition for indicating
// which OCI manifest artifact type is relevant to a particular trace span.
func OpenTofuOCIManifestArtifactType(typ string) attribute.KeyValue {
	return attribute.String("opentofu.oci.manifest.artifact_type", typ)
}

// OpenTofuOCIBlobSize returns an attribute definition for indicating
// the size in bytes of an OCI manifest that is relevant to a particular
// trace span.
func OpenTofuOCIManifestSize(size int64) attribute.KeyValue {
	return attribute.Int64("opentofu.oci.manifest.size", size)
}

// OpenTofuOCIBlobDigest returns an attribute definition for indicating
// which OCI blob digest is relevant to a particular trace span.
func OpenTofuOCIBlobDigest(digest string) attribute.KeyValue {
	return attribute.String("opentofu.oci.blob.digest", digest)
}

// OpenTofuOCIBlobMediaType returns an attribute definition for indicating
// which OCI blob media type is relevant to a particular trace span.
func OpenTofuOCIBlobMediaType(typ string) attribute.KeyValue {
	return attribute.String("opentofu.oci.blob.media_type", typ)
}

// OpenTofuOCIBlobArtifactType returns an attribute definition for indicating
// which OCI blob artifact type is relevant to a particular trace span.
func OpenTofuOCIBlobArtifactType(typ string) attribute.KeyValue {
	return attribute.String("opentofu.oci.blob.artifact_type", typ)
}

// OpenTofuOCIBlobSize returns an attribute definition for indicating

Review comment (suggestion):
```suggestion
// OpenTofuOCIManifestSize returns an attribute definition for indicating
```

Code after:

// OpenTofuOCIReferenceTag returns an attribute definition for indicating
// which OCI repository tag is relevant to a particular trace span.
func OpenTofuOCIReferenceTag(name string) attribute.KeyValue {
	return attribute.String("opentofu.oci.reference.tag", name)
}

// OpenTofuOCIReferenceDigest returns an attribute definition for indicating
// which OCI digest reference is relevant to a particular trace span.
func OpenTofuOCIReferenceDigest(digest string) attribute.KeyValue {
	return attribute.String("opentofu.oci.reference.digest", digest)
}

// OpenTofuOCIManifestMediaType returns an attribute definition for indicating
// which OCI manifest media type is relevant to a particular trace span.
func OpenTofuOCIManifestMediaType(typ string) attribute.KeyValue {
	return attribute.String("opentofu.oci.manifest.media_type", typ)
}

// OpenTofuOCIManifestArtifactType returns an attribute definition for indicating
// which OCI manifest artifact type is relevant to a particular trace span.
func OpenTofuOCIManifestArtifactType(typ string) attribute.KeyValue {
	return attribute.String("opentofu.oci.manifest.artifact_type", typ)
}

// OpenTofuOCIManifestSize returns an attribute definition for indicating
// the size in bytes of an OCI manifest that is relevant to a particular
// trace span.
func OpenTofuOCIManifestSize(size int64) attribute.KeyValue {
	return attribute.Int64("opentofu.oci.manifest.size", size)
}

// OpenTofuOCIBlobDigest returns an attribute definition for indicating
// which OCI blob digest is relevant to a particular trace span.
func OpenTofuOCIBlobDigest(digest string) attribute.KeyValue {
	return attribute.String("opentofu.oci.blob.digest", digest)
}

// OpenTofuOCIBlobMediaType returns an attribute definition for indicating
// which OCI blob media type is relevant to a particular trace span.
func OpenTofuOCIBlobMediaType(typ string) attribute.KeyValue {
	return attribute.String("opentofu.oci.blob.media_type", typ)
}

// OpenTofuOCIBlobArtifactType returns an attribute definition for indicating
// which OCI blob artifact type is relevant to a particular trace span.
func OpenTofuOCIBlobArtifactType(typ string) attribute.KeyValue {
	return attribute.String("opentofu.oci.blob.artifact_type", typ)
}

// OpenTofuOCIBlobSize returns an attribute definition for indicating