Skip to content

Commit

Permalink
Move partialsuccess code to internal package (#3146)
Browse files Browse the repository at this point in the history
* Move partialsuccess code to internal package

* Fix imports to new pkg
  • Loading branch information
MrAlias committed Sep 8, 2022
1 parent 569f743 commit 13906ac
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package otlp // import "go.opentelemetry.io/otel/exporters/otlp"
package internal // import "go.opentelemetry.io/otel/exporters/otlp/internal"

import "fmt"

Expand Down
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package otlp // import "go.opentelemetry.io/otel/exporters/otlp"
package internal // import "go.opentelemetry.io/otel/exporters/otlp/internal"

import (
"errors"
Expand Down
6 changes: 3 additions & 3 deletions exporters/otlp/otlptrace/otlptracegrpc/client.go
Expand Up @@ -27,7 +27,7 @@ import (
"google.golang.org/grpc/status"

"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/exporters/otlp"
"go.opentelemetry.io/otel/exporters/otlp/internal"
"go.opentelemetry.io/otel/exporters/otlp/internal/retry"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlpconfig"
Expand Down Expand Up @@ -202,8 +202,8 @@ func (c *client) UploadTraces(ctx context.Context, protoSpans []*tracepb.Resourc
ResourceSpans: protoSpans,
})
if resp != nil && resp.PartialSuccess != nil {
otel.Handle(otlp.PartialSuccessToError(
otlp.TracingPartialSuccess,
otel.Handle(internal.PartialSuccessToError(
internal.TracingPartialSuccess,
resp.PartialSuccess.RejectedSpans,
resp.PartialSuccess.ErrorMessage,
))
Expand Down
6 changes: 3 additions & 3 deletions exporters/otlp/otlptrace/otlptracehttp/client.go
Expand Up @@ -30,7 +30,7 @@ import (
"google.golang.org/protobuf/proto"

"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/exporters/otlp"
"go.opentelemetry.io/otel/exporters/otlp/internal"
"go.opentelemetry.io/otel/exporters/otlp/internal/retry"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlpconfig"
Expand Down Expand Up @@ -180,8 +180,8 @@ func (d *client) UploadTraces(ctx context.Context, protoSpans []*tracepb.Resourc
}

if respProto.PartialSuccess != nil {
otel.Handle(otlp.PartialSuccessToError(
otlp.TracingPartialSuccess,
otel.Handle(internal.PartialSuccessToError(
internal.TracingPartialSuccess,
respProto.PartialSuccess.RejectedSpans,
respProto.PartialSuccess.ErrorMessage,
))
Expand Down

0 comments on commit 13906ac

Please sign in to comment.