-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix tests * Update Javadocs * Update year in license headers * Move observability APIs to a separate package
- Loading branch information
1 parent
e917d75
commit ae6c0b9
Showing
22 changed files
with
182 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 33 additions & 40 deletions
73
.../batch/core/job/BatchJobTagsProvider.java → ...e/observability/BatchJobTagsProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,33 @@ | ||
/* | ||
* Copyright 2006-2009 the original author or 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 | ||
* | ||
* https://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.springframework.batch.core.job; | ||
|
||
import io.micrometer.core.instrument.observation.Observation; | ||
|
||
import org.springframework.batch.core.Job; | ||
import org.springframework.batch.core.JobExecution; | ||
import org.springframework.batch.core.JobInterruptedException; | ||
import org.springframework.batch.core.StartLimitExceededException; | ||
import org.springframework.batch.core.Step; | ||
import org.springframework.batch.core.StepExecution; | ||
import org.springframework.batch.core.repository.JobRestartException; | ||
|
||
/** | ||
* {@link Observation.TagsProvider} for {@link BatchJobContext}. | ||
* | ||
* @author Marcin Grzejszczak | ||
*/ | ||
public interface BatchJobTagsProvider extends Observation.TagsProvider<BatchJobContext> { | ||
|
||
@Override | ||
default boolean supportsContext(Observation.Context context) { | ||
return context instanceof BatchJobContext; | ||
} | ||
} | ||
/* | ||
* Copyright 2022 the original author or 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 | ||
* | ||
* https://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.springframework.batch.core.observability; | ||
|
||
import io.micrometer.core.instrument.observation.Observation; | ||
|
||
/** | ||
* {@link Observation.TagsProvider} for {@link BatchJobContext}. | ||
* | ||
* @author Marcin Grzejszczak | ||
* @since 5.0 | ||
*/ | ||
public interface BatchJobTagsProvider extends Observation.TagsProvider<BatchJobContext> { | ||
|
||
@Override | ||
default boolean supportsContext(Observation.Context context) { | ||
return context instanceof BatchJobContext; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 33 additions & 32 deletions
65
...atch/core/step/BatchStepTagsProvider.java → .../observability/BatchStepTagsProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,33 @@ | ||
/* | ||
* Copyright 2006-2009 the original author or 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 | ||
* | ||
* https://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.springframework.batch.core.step; | ||
|
||
import io.micrometer.core.instrument.observation.Observation; | ||
|
||
/** | ||
* {@link Observation.TagsProvider} for {@link BatchStepContext}. | ||
* | ||
* @author Marcin Grzejszczak | ||
*/ | ||
public interface BatchStepTagsProvider extends Observation.TagsProvider<BatchStepContext> { | ||
|
||
@Override | ||
default boolean supportsContext(Observation.Context context) { | ||
return context instanceof BatchStepContext; | ||
} | ||
} | ||
/* | ||
* Copyright 2022 the original author or 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 | ||
* | ||
* https://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.springframework.batch.core.observability; | ||
|
||
import io.micrometer.core.instrument.observation.Observation; | ||
|
||
/** | ||
* {@link Observation.TagsProvider} for {@link BatchStepContext}. | ||
* | ||
* @author Marcin Grzejszczak | ||
* @since 5.0 | ||
*/ | ||
public interface BatchStepTagsProvider extends Observation.TagsProvider<BatchStepContext> { | ||
|
||
@Override | ||
default boolean supportsContext(Observation.Context context) { | ||
return context instanceof BatchStepContext; | ||
} | ||
} |
Oops, something went wrong.