Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ val ScalaPBCirceVersion = "0.16.0"
val CaseInsensitiveVersion = "1.5.0"
val ScalaJavaTimeVersion = "2.6.0"
val ScribeVersion = "3.17.0"
val Otel4sVersion = "1.0.0"
val Otel4sVersion = "1.0.1"

lazy val scalaReflectDependency = Def.settings(
libraryDependencies ++= {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import org.typelevel.otel4s.sdk.TelemetryResource
import org.typelevel.otel4s.sdk.common.Diagnostic
import org.typelevel.otel4s.sdk.resource.TelemetryResourceDetector
import org.typelevel.otel4s.semconv.SchemaUrls
import org.typelevel.otel4s.semconv.attributes.ContainerAttributes

import scala.concurrent.duration._

Expand Down Expand Up @@ -167,10 +168,10 @@ object AwsEcsDetector {
val CloudAvailabilityZones: AttributeKey[String] = AttributeKey("cloud.availability_zone")
val CloudRegion: AttributeKey[String] = AttributeKey("cloud.region")
val CloudResourceId: AttributeKey[String] = AttributeKey("cloud.resource_id")
val ContainerId: AttributeKey[String] = AttributeKey("container.id")
val ContainerId: AttributeKey[String] = ContainerAttributes.ContainerId
val ContainerName: AttributeKey[String] = AttributeKey("container.name")
val ContainerImageName: AttributeKey[String] = AttributeKey("container.image.name")
val ContainerImageTags: AttributeKey[Seq[String]] = AttributeKey("container.image.tags")
val ContainerImageName: AttributeKey[String] = ContainerAttributes.ContainerImageName
val ContainerImageTags: AttributeKey[Seq[String]] = ContainerAttributes.ContainerImageTags
val AwsEcsClusterArn: AttributeKey[String] = AttributeKey("aws.ecs.cluster.arn")
val AwsEcsContainerImageId: AttributeKey[String] = AttributeKey("aws.ecs.container.image.id")
val AwsEcsContainerArn: AttributeKey[String] = AttributeKey("aws.ecs.container.arn")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ import org.typelevel.otel4s.sdk.TelemetryResource
import org.typelevel.otel4s.sdk.common.Diagnostic
import org.typelevel.otel4s.sdk.resource.TelemetryResourceDetector
import org.typelevel.otel4s.semconv.SchemaUrls
import org.typelevel.otel4s.semconv.attributes.ContainerAttributes
import org.typelevel.otel4s.semconv.attributes.K8sAttributes

import scala.concurrent.duration._

Expand Down Expand Up @@ -183,8 +185,8 @@ object AwsEksDetector {
private object Keys {
val CloudProvider: AttributeKey[String] = AttributeKey("cloud.provider")
val CloudPlatform: AttributeKey[String] = AttributeKey("cloud.platform")
val K8sClusterName: AttributeKey[String] = AttributeKey("k8s.cluster.name")
val ContainerId: AttributeKey[String] = AttributeKey("container.id")
val K8sClusterName: AttributeKey[String] = K8sAttributes.K8sClusterName
val ContainerId: AttributeKey[String] = ContainerAttributes.ContainerId
}

/** The detector detects if running on AWS EKS and provides EKS-specific resource attributes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import org.http4s.dsl.io._
import org.typelevel.otel4s.Attributes
import org.typelevel.otel4s.sdk.TelemetryResource
import org.typelevel.otel4s.semconv.SchemaUrls
import org.typelevel.otel4s.semconv.attributes.ContainerAttributes._
import org.typelevel.otel4s.semconv.attributes.K8sAttributes._
import org.typelevel.otel4s.semconv.experimental.attributes.CloudExperimentalAttributes._
import org.typelevel.otel4s.semconv.experimental.attributes.ContainerExperimentalAttributes._
import org.typelevel.otel4s.semconv.experimental.attributes.K8sExperimentalAttributes._

import scala.collection.immutable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ import org.typelevel.otel4s.Attribute
import org.typelevel.otel4s.Attributes
import org.typelevel.otel4s.sdk.TelemetryResource
import org.typelevel.otel4s.semconv.SchemaUrls
import org.typelevel.otel4s.semconv.attributes.ContainerAttributes._
import org.typelevel.otel4s.semconv.experimental.attributes.AwsExperimentalAttributes._
import org.typelevel.otel4s.semconv.experimental.attributes.CloudExperimentalAttributes._
import org.typelevel.otel4s.semconv.experimental.attributes.ContainerExperimentalAttributes._
import org.typelevel.otel4s.semconv.experimental.attributes.ContainerExperimentalAttributes.ContainerName

import scala.collection.immutable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private object NodeMemoryMetrics {
Meter[F].batchCallback.of(
Meter[F]
.observableGauge[Double](MetricNames.V8jsMemoryHeapLimit)
.withDescription("Total heap memory size pre-allocated.")
.withDescription("Total heap memory size pre-allocated for a heap space.")
.withUnit("By")
.createObserver,
Meter[F]
Expand Down Expand Up @@ -77,7 +77,7 @@ private object NodeMemoryMetrics {
Attributes(Keys.V8jsHeapSpaceName(spaceName))

private object MetricNames {
val V8jsMemoryHeapLimit = "v8js.memory.heap.limit"
val V8jsMemoryHeapLimit = "v8js.memory.heap.space.size"
val V8jsMemoryHeapUsed = "v8js.memory.heap.used"
val V8jsHeapSpaceAvailableSize = "v8js.memory.heap.space.available_size"
val V8jsHeapSpacePhysicalSize = "v8js.memory.heap.space.physical_size"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class RuntimeMetricsSuite extends CatsEffectSuite {
// V8jsExperimentalMetrics.GcDuration, // todo: I don't think we can trigger gc on demand in JS?
// V8 JS Memory
V8jsExperimentalMetrics.MemoryHeapUsed,
V8jsExperimentalMetrics.MemoryHeapLimit,
V8jsExperimentalMetrics.MemoryHeapSpaceSize,
V8jsExperimentalMetrics.MemoryHeapSpacePhysicalSize,
V8jsExperimentalMetrics.MemoryHeapSpaceAvailableSize,
// thread
Expand Down
Loading