Skip to content

Commit

Permalink
Polish gh-4753
Browse files Browse the repository at this point in the history
Makes the Jetty server dependency optional. We plan to add Jetty client instrumentation and users may be use only one or the other, so micrometer-jetty12 should not pull in both dependencies. It will be up to users to separately have a dependency on Jetty server or client.

Updated copyright years and since tags.

Removed incubating annotations.
  • Loading branch information
shakuzen committed Feb 28, 2024
1 parent 3da9c29 commit 253689e
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 20 deletions.
9 changes: 2 additions & 7 deletions micrometer-jetty12/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,9 @@ if (!javaLanguageVersion.canCompileOrRun(17)) {

dependencies {
api project(":micrometer-core")
api libs.jetty12Server
optionalApi libs.jetty12Server


// Test sample project with SLFJ4 2.x / Logback 1.4
runtimeOnly(libs.logback14) {
version {
strictly libs.logback14.get().version
}
}
testRuntimeOnly(libs.logback14) {
version {
strictly libs.logback14.get().version
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020 VMware, Inc.
* Copyright 2024 VMware, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,6 @@

package io.micrometer.jetty12;

import io.micrometer.core.annotation.Incubating;
import io.micrometer.core.instrument.Tag;
import io.micrometer.core.instrument.Tags;
import io.micrometer.core.instrument.binder.http.Outcome;
Expand All @@ -26,9 +25,8 @@
* Default {@link JettyCoreRequestTagsProvider}.
*
* @author Joakim Erdfelt
* @since 1.11.0
* @since 1.13.0
*/
@Incubating(since = "1.11.0")
public class DefaultJettyCoreRequestTagsProvider implements JettyCoreRequestTagsProvider {

private static final Tag STATUS_UNKNOWN = Tag.of("status", "UNKNOWN");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 VMware, Inc.
* Copyright 2024 VMware, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,17 +16,15 @@

package io.micrometer.jetty12;

import io.micrometer.core.annotation.Incubating;
import io.micrometer.core.instrument.Tag;
import org.eclipse.jetty.server.Request;

/**
* Provides {@link Tag Tags} for Jetty Core request handling.
*
* @author Joakim Erdfelt
* @since 1.11.0
* @since 1.13.0
*/
@Incubating(since = "1.11.0")
@FunctionalInterface
public interface JettyCoreRequestTagsProvider {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 VMware, Inc.
* Copyright 2024 VMware, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -35,7 +35,7 @@
*
* @author Jon Schneider
* @author Joakim Erdfelt
* @since 1.10.0
* @since 1.13.0
*/
public class TimedHandler extends EventsHandler implements Graceful {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 VMware, Inc.
* Copyright 2024 VMware, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 VMware, Inc.
* Copyright 2024 VMware, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion micrometer-jetty12/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
Copyright 2018 VMware, Inc.
Copyright 2024 VMware, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 253689e

Please sign in to comment.