Skip to content

make debug exporter available for custom builds #1551

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

Merged
merged 1 commit into from
Oct 21, 2024
Merged
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
28 changes: 28 additions & 0 deletions collector/lambdacomponents/exporter/debug.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//go:build lambdacomponents.custom && (lambdacomponents.all || lambdacomponents.exporter.all || lambdacomponents.exporter.debug)

// Copyright The OpenTelemetry Authors
//
// 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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The convention in collector-contrib is to simply use...

// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

Although the convention differs in this repo, I think it's innocuous migration that would be worthwhile. Since the convention here differs I'm not suggesting this PR has to be the place where we would migrate. And I'm certainly open to other reasoning.

The benefit in this case would be almost a 50% reduction in the line scan requirement for reviewers and other readers. To my brain that matters. It's also nicer to see that someone has requested a review on 50% fewer lines, when 1/2 of that is skimming over license detail.

To be clear, I'm approving as is in keeping with current practice here. And defer to consensus on whether and when we would migrate.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I support switching to the shorter format. How do we standardize that here?

package exporter

import (
"go.opentelemetry.io/collector/exporter"
"go.opentelemetry.io/collector/exporter/debugexporter"
)

func init() {
Factories = append(Factories, func(extensionId string) exporter.Factory {
return debugexporter.NewFactory()
})
}
Loading