Skip to content

Commit

Permalink
Update to Brave 6 / Zipkin 3 (#64)
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <[email protected]>
  • Loading branch information
reta authored Dec 9, 2024
1 parent 6007de4 commit a46953c
Show file tree
Hide file tree
Showing 29 changed files with 107 additions and 352 deletions.
15 changes: 3 additions & 12 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,8 @@ If you are adding a new file it should have a header like below. This
can be automatically added by running `./mvnw com.mycila:license-maven-plugin:format`.

```
/**
* Copyright 2019 The OpenZipkin 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.
/*
* Copyright The OpenZipkin Authors
* SPDX-License-Identifier: Apache-2.0
*/
```
13 changes: 2 additions & 11 deletions .settings.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2016-2020 The OpenZipkin 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.
Copyright The OpenZipkin Authors
SPDX-License-Identifier: Apache-2.0
-->
<settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down
13 changes: 2 additions & 11 deletions build-bin/git/login_git
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2020 The OpenZipkin 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.
# Copyright The OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

set -ue
Expand Down
13 changes: 2 additions & 11 deletions build-bin/git/version_from_trigger_tag
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2020 The OpenZipkin 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.
# Copyright The OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

set -ue
Expand Down
13 changes: 2 additions & 11 deletions build-bin/gpg/configure_gpg
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2020 The OpenZipkin 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.
# Copyright The OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

set -ue
Expand Down
13 changes: 2 additions & 11 deletions build-bin/maven/maven_deploy
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2020 The OpenZipkin 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.
# Copyright The OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

set -ue
Expand Down
13 changes: 2 additions & 11 deletions build-bin/maven/maven_go_offline
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2020 The OpenZipkin 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.
# Copyright The OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

# This is a go-offline that properly works with multi-module builds
Expand Down
13 changes: 2 additions & 11 deletions build-bin/maven/maven_opts
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2020 The OpenZipkin 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.
# Copyright The OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

# This script checks each variable value, so it isn't important to fail on unbound (set -u)
Expand Down
13 changes: 2 additions & 11 deletions build-bin/maven/maven_release
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2020 The OpenZipkin 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.
# Copyright The OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

set -ue
Expand Down
15 changes: 3 additions & 12 deletions exporter-sender-kafka/pom.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
<?xml version="1.0"?>
<!--
Copyright 2016-2020 The OpenZipkin 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.
Copyright The OpenZipkin Authors
SPDX-License-Identifier: Apache-2.0
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>io.zipkin.brave.karaf</groupId>
<artifactId>brave-karaf-parent</artifactId>
<version>0.2.7-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
/*
* Copyright 2016-2020 The OpenZipkin 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.
* Copyright The OpenZipkin Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.zipkin.brave.exporter.sender.kafka;

Expand All @@ -24,8 +15,8 @@
import org.osgi.service.component.annotations.Deactivate;
import org.osgi.service.metatype.annotations.Designate;
import org.osgi.service.metatype.annotations.ObjectClassDefinition;
import zipkin2.codec.Encoding;
import zipkin2.reporter.Sender;
import zipkin2.reporter.Encoding;
import zipkin2.reporter.BytesMessageSender;
import zipkin2.reporter.kafka.KafkaSender;

@Component(
Expand All @@ -37,7 +28,7 @@
public class KafkaSenderExporter {

private static final String OVERRIDE_PREFIX = "kafka.";
private ServiceRegistration<Sender> reg;
private ServiceRegistration<BytesMessageSender> reg;
private KafkaSender sender;

@Activate
Expand All @@ -49,7 +40,7 @@ public void activate(Config config, BundleContext context, Map<String, String> p
.overrides(getOverrides(properties))
.topic(config.topic())
.build();
reg = context.registerService(Sender.class, sender, new Hashtable<String, String>(properties));
reg = context.registerService(BytesMessageSender.class, sender, new Hashtable<String, String>(properties));
}

private HashMap<String, String> getOverrides(Map<String, String> properties) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
/*
* Copyright 2016-2020 The OpenZipkin 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.
* Copyright The OpenZipkin Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.zipkin.brave.exporter.sender.kafka;

Expand All @@ -18,7 +9,7 @@
import java.util.Map;
import org.junit.Test;
import org.osgi.framework.BundleContext;
import zipkin2.codec.Encoding;
import zipkin2.reporter.Encoding;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
Expand Down
15 changes: 3 additions & 12 deletions exporter-sender-okhttp/pom.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
<?xml version="1.0"?>
<!--
Copyright 2016-2020 The OpenZipkin 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.
Copyright The OpenZipkin Authors
SPDX-License-Identifier: Apache-2.0
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>io.zipkin.brave.karaf</groupId>
<artifactId>brave-karaf-parent</artifactId>
<version>0.2.7-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
/*
* Copyright 2016-2020 The OpenZipkin 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.
* Copyright The OpenZipkin Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.zipkin.brave.exporter.sender.okhttp;

Expand All @@ -23,7 +14,7 @@
import org.osgi.service.component.annotations.Deactivate;
import org.osgi.service.metatype.annotations.Designate;
import org.osgi.service.metatype.annotations.ObjectClassDefinition;
import zipkin2.reporter.Sender;
import zipkin2.reporter.BytesMessageSender;
import zipkin2.reporter.okhttp3.OkHttpSender;

@Component(
Expand All @@ -34,7 +25,7 @@
@Designate(ocd = SenderOkHttpExporter.Config.class)
public class SenderOkHttpExporter {

private ServiceRegistration<Sender> reg;
private ServiceRegistration<BytesMessageSender> reg;
private OkHttpSender sender;

@ObjectClassDefinition(name = "Zipkin Sender OkHttp") @interface Config {
Expand All @@ -52,7 +43,7 @@ public void activate(Config config, BundleContext context, Map<String, String> p
.compressionEnabled(config.compressionEnabled())
.messageMaxBytes(config.messageMaxBytes())
.build();
reg = context.registerService(Sender.class, sender, new Hashtable<>(properties));
reg = context.registerService(BytesMessageSender.class, sender, new Hashtable<>(properties));
}

@Deactivate
Expand Down
15 changes: 3 additions & 12 deletions exporter/pom.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
<?xml version="1.0"?>
<!--
Copyright 2016-2020 The OpenZipkin 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.
Copyright The OpenZipkin Authors
SPDX-License-Identifier: Apache-2.0
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>io.zipkin.brave.karaf</groupId>
<artifactId>brave-karaf-parent</artifactId>
<version>0.2.7-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Loading

0 comments on commit a46953c

Please sign in to comment.