diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 24c83f752..f76cdcd25 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,11 +84,11 @@ jobs: - name: Make target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') - run: mkdir -p testkit/metrics/jvm/target java/metrics/target sdk-exporter/common/.js/target testkit/common/jvm/target sdk/common/.native/target sdk/common/.js/target core/trace/.js/target semconv/.jvm/target sdk/trace/.js/target core/common/.jvm/target sdk-exporter/common/.native/target java/trace/target sdk-exporter/trace/.jvm/target unidocs/target core/metrics/.native/target core/all/.native/target core/metrics/.jvm/target core/all/.js/target java/all/target sdk/all/.native/target java/common/target core/metrics/.js/target core/all/.jvm/target sdk-exporter/trace/.native/target sdk/common/.jvm/target core/trace/.native/target sdk/trace/.native/target semconv/.js/target core/trace/.jvm/target sdk-exporter/common/.jvm/target sdk-exporter/trace/.js/target core/common/.native/target core/common/.js/target semconv/.native/target testkit/all/jvm/target sdk/all/.js/target sdk/all/.jvm/target sdk/trace/.jvm/target project/target + run: mkdir -p testkit/metrics/jvm/target java/metrics/target sdk-exporter/common/.js/target testkit/common/jvm/target sdk/common/.native/target sdk/common/.js/target core/trace/.js/target semconv/.jvm/target sdk/trace/.js/target core/common/.jvm/target sdk-exporter/common/.native/target java/trace/target sdk-exporter/trace/.jvm/target unidocs/target core/metrics/.native/target core/all/.native/target core/metrics/.jvm/target core/all/.js/target sdk-exporter/proto/.jvm/target sdk-exporter/proto/.js/target java/all/target sdk/all/.native/target java/common/target core/metrics/.js/target core/all/.jvm/target sdk-exporter/trace/.native/target sdk/common/.jvm/target core/trace/.native/target sdk/trace/.native/target semconv/.js/target sdk-exporter/proto/.native/target core/trace/.jvm/target sdk-exporter/common/.jvm/target sdk-exporter/trace/.js/target core/common/.native/target core/common/.js/target semconv/.native/target testkit/all/jvm/target sdk/all/.js/target sdk/all/.jvm/target sdk/trace/.jvm/target project/target - name: Compress target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') - run: tar cf targets.tar testkit/metrics/jvm/target java/metrics/target sdk-exporter/common/.js/target testkit/common/jvm/target sdk/common/.native/target sdk/common/.js/target core/trace/.js/target semconv/.jvm/target sdk/trace/.js/target core/common/.jvm/target sdk-exporter/common/.native/target java/trace/target sdk-exporter/trace/.jvm/target unidocs/target core/metrics/.native/target core/all/.native/target core/metrics/.jvm/target core/all/.js/target java/all/target sdk/all/.native/target java/common/target core/metrics/.js/target core/all/.jvm/target sdk-exporter/trace/.native/target sdk/common/.jvm/target core/trace/.native/target sdk/trace/.native/target semconv/.js/target core/trace/.jvm/target sdk-exporter/common/.jvm/target sdk-exporter/trace/.js/target core/common/.native/target core/common/.js/target semconv/.native/target testkit/all/jvm/target sdk/all/.js/target sdk/all/.jvm/target sdk/trace/.jvm/target project/target + run: tar cf targets.tar testkit/metrics/jvm/target java/metrics/target sdk-exporter/common/.js/target testkit/common/jvm/target sdk/common/.native/target sdk/common/.js/target core/trace/.js/target semconv/.jvm/target sdk/trace/.js/target core/common/.jvm/target sdk-exporter/common/.native/target java/trace/target sdk-exporter/trace/.jvm/target unidocs/target core/metrics/.native/target core/all/.native/target core/metrics/.jvm/target core/all/.js/target sdk-exporter/proto/.jvm/target sdk-exporter/proto/.js/target java/all/target sdk/all/.native/target java/common/target core/metrics/.js/target core/all/.jvm/target sdk-exporter/trace/.native/target sdk/common/.jvm/target core/trace/.native/target sdk/trace/.native/target semconv/.js/target sdk-exporter/proto/.native/target core/trace/.jvm/target sdk-exporter/common/.jvm/target sdk-exporter/trace/.js/target core/common/.native/target core/common/.js/target semconv/.native/target testkit/all/jvm/target sdk/all/.js/target sdk/all/.jvm/target sdk/trace/.jvm/target project/target - name: Upload target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') diff --git a/sdk-exporter/trace/src/main/scala/org/typelevel/otel4s/sdk/exporter/otlp/OtlpHttpSpanExporter.scala b/sdk-exporter/trace/src/main/scala/org/typelevel/otel4s/sdk/exporter/otlp/OtlpHttpSpanExporter.scala index c05520ab4..f57dd995f 100644 --- a/sdk-exporter/trace/src/main/scala/org/typelevel/otel4s/sdk/exporter/otlp/OtlpHttpSpanExporter.scala +++ b/sdk-exporter/trace/src/main/scala/org/typelevel/otel4s/sdk/exporter/otlp/OtlpHttpSpanExporter.scala @@ -31,6 +31,7 @@ import io.opentelemetry.proto.collector.trace.v1.trace_service.ExportTraceServic import org.http4s.EntityEncoder import org.http4s.Header import org.http4s.Headers +import org.http4s.HttpVersion import org.http4s.Method import org.http4s.Request import org.http4s.Response @@ -66,7 +67,7 @@ final class OtlpHttpSpanExporter[F[_]: Temporal: Console] private ( } def exportSpans(spans: List[SpanData]): F[Unit] = { - val request = Request[F](Method.POST, config.endpoint) + val request = Request[F](Method.POST, config.endpoint, HttpVersion.`HTTP/2`) .withEntity(spans) .putHeaders(config.headers) diff --git a/sdk-exporter/trace/src/main/scala/org/typelevel/otel4s/sdk/exporter/otlp/ProtoCodecs.scala b/sdk-exporter/trace/src/main/scala/org/typelevel/otel4s/sdk/exporter/otlp/ProtoCodecs.scala index e80a6fef0..477822e71 100644 --- a/sdk-exporter/trace/src/main/scala/org/typelevel/otel4s/sdk/exporter/otlp/ProtoCodecs.scala +++ b/sdk-exporter/trace/src/main/scala/org/typelevel/otel4s/sdk/exporter/otlp/ProtoCodecs.scala @@ -1,3 +1,19 @@ +/* + * Copyright 2023 Typelevel + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.typelevel.otel4s package sdk.exporter.otlp