Skip to content

Commit

Permalink
Merge pull request #77 from intergral/76_plugins
Browse files Browse the repository at this point in the history
feat(plugins): change the way plugins are loaded
  • Loading branch information
Umaaz authored Dec 13, 2023
2 parents 7a33829 + 82e6e9e commit 2798fd7
Show file tree
Hide file tree
Showing 49 changed files with 657 additions and 859 deletions.
2 changes: 2 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# 1.1.1 (xx/xx/2023)
# 1.2.0 (xx/xx/2023)
- **[CHANGE]**: plugin: Change the plugins to use SPI to load [#77](https://github.com/intergral/deep/pull/77) [@Umaaz](https://github.com/Umaaz)

# 1.1.2 (29/09/2023)
- **[CHANGE]**: version: Override grpc-netty dependencies to remove CVE [#44](https://github.com/intergral/deep/pull/44) [@LMarkie](https://github.com/LMarkie)
- **[BUGFIX]**: build: change mvn dep graph to run only on master [#45](https://github.com/intergral/deep/pull/45) [@Umaaz](https://github.com/Umaaz)
- **[BUGFIX]**: build: update build to ensure agent is built for cf-tests [#55](https://github.com/intergral/deep/pull/55) [@Umaaz](https://github.com/Umaaz)
- **[Snyk]**: Upgrade: net.bytebuddy:byte-buddy-agent from 1.14.4 to 1.14.7 [#43](https://github.com/intergral/deep/pull/43) [@Umaaz](https://github.com/Umaaz)

# 1.1.1 (25/09/2023)
- **[CHANGE]**: reflection: reduce duplicate reflection code and proxy style [#34](https://github.com/intergral/deep/pull/34) [@Umaaz](https://github.com/Umaaz)
- **[Snyk]**: vulnerability: Fix for 1 vulnerability [#35](https://github.com/intergral/deep/pull/35) [@Umaaz](https://github.com/Umaaz)
- **[Snyk]**: Upgrade: org.junit.jupiter:junit-jupiter from 5.9.3 to 5.10.0 [#38](https://github.com/intergral/deep/pull/38) [@Umaaz](https://github.com/Umaaz)

# 1.1.0 (06/09/2023)

Expand Down
10 changes: 0 additions & 10 deletions agent-api/src/main/java/com/intergral/deep/agent/api/IDeep.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

package com.intergral.deep.agent.api;

import com.intergral.deep.agent.api.plugin.IPlugin;
import com.intergral.deep.agent.api.plugin.IPlugin.IPluginRegistration;
import com.intergral.deep.agent.api.tracepoint.ITracepoint.ITracepointRegistration;
import java.util.Collection;
import java.util.Map;
Expand Down Expand Up @@ -56,14 +54,6 @@ public interface IDeep {
*/
String getVersion();

/**
* This allows the registration of custom plugins.
*
* @param plugin the plugin that can be used to decorate snapshots
* @return a {@link IPluginRegistration} that can be used to unregister the plugin
*/
IPluginRegistration registerPlugin(final IPlugin plugin);

/**
* Create a tracepoint that will only exist on this instance.
*
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

package com.intergral.deep.agent.api.auth;

import com.intergral.deep.agent.api.reflection.IReflection;
import com.intergral.deep.agent.api.settings.ISettings;
import com.intergral.deep.agent.api.spi.IDeepPlugin;
import java.util.Base64;
import java.util.Collections;
import java.util.Map;
Expand All @@ -34,12 +36,14 @@
* <p>
* These values are then base64 encoded and attached to the outbound requests as the {@code authorization} header.
*/
public class BasicAuthProvider implements IAuthProvider {
public class BasicAuthProvider implements IDeepPlugin, IAuthProvider {

private final ISettings settings;
private ISettings settings;

public BasicAuthProvider(final ISettings settings) {
@Override
public IDeepPlugin configure(final ISettings settings, final IReflection reflection) {
this.settings = settings;
return this;
}

@Override
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright (C) 2023 Intergral GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package com.intergral.deep.agent.api.plugin;

import com.intergral.deep.agent.api.resource.Resource;
import com.intergral.deep.agent.api.settings.ISettings;

/**
* This type allows a plugin to provide additional attributes to captured snapshots.
*/
public interface ISnapshotDecorator {

/**
* This method is called by Deep after a snapshot is created.
* <p>
* This method is executed inline with the tracepoint code.
*
* @param settings the current settings of Deep
* @param snapshot the {@link ISnapshotContext} describing the snapshot
* @return a new {@link Resource} to be added to the snapshot, or {@code null} to do nothing
*/
Resource decorate(final ISettings settings, final ISnapshotContext snapshot);
}

This file was deleted.

Loading

0 comments on commit 2798fd7

Please sign in to comment.