diff --git a/core/src/main/java/tech/illuin/wombat/core/asset/AssetIdentity.java b/core/src/main/java/tech/illuin/wombat/core/asset/AssetIdentity.java index d72d021..7458952 100644 --- a/core/src/main/java/tech/illuin/wombat/core/asset/AssetIdentity.java +++ b/core/src/main/java/tech/illuin/wombat/core/asset/AssetIdentity.java @@ -16,32 +16,28 @@ public record AssetIdentity( @NotBlank @JsonProperty("id") String id, @NotBlank @JsonProperty("environmentId") @JsonAlias("environment-id") String environmentId, - @NotBlank @JsonProperty("name") String name, @NotBlank @JsonProperty("type") String assetType ) { public AssetIdentity { Objects.requireNonNull(id, "id must not be null"); Objects.requireNonNull(environmentId, "environmentId must not be null"); - Objects.requireNonNull(name, "name must not be null"); Objects.requireNonNull(assetType, "assetType must not be null"); if (id.isBlank()) throw new IllegalArgumentException("id must not be blank"); if (environmentId.isBlank()) throw new IllegalArgumentException("environmentId must not be blank"); - if (name.isBlank()) - throw new IllegalArgumentException("name must not be blank"); if (assetType.isBlank()) throw new IllegalArgumentException("assetType must not be blank"); } - public static AssetIdentity of(String id, String environmentId, String name, String assetType) + public static AssetIdentity of(String id, String environmentId, String assetType) { - return new AssetIdentity(id, environmentId, name, assetType); + return new AssetIdentity(id, environmentId, assetType); } - public static AssetIdentity of(String id, String environmentId, String name, AssetType assetType) + public static AssetIdentity of(String id, String environmentId, AssetType assetType) { - return new AssetIdentity(id, environmentId, name, assetType.name()); + return new AssetIdentity(id, environmentId, assetType.name()); } } diff --git a/core/src/main/java/tech/illuin/wombat/core/asset/SimulatedAsset.java b/core/src/main/java/tech/illuin/wombat/core/asset/SimulatedAsset.java index f6b3aae..b794eac 100644 --- a/core/src/main/java/tech/illuin/wombat/core/asset/SimulatedAsset.java +++ b/core/src/main/java/tech/illuin/wombat/core/asset/SimulatedAsset.java @@ -11,6 +11,6 @@ public interface SimulatedAsset extends Asset @Override default AssetIdentity identity() { - return AssetIdentity.of("simulated-asset", "simulated-environment", "simulated-asset", this.type()); + return AssetIdentity.of("simulated-asset", "simulated-environment", this.type()); } } diff --git a/core/src/main/java/tech/illuin/wombat/core/evaluation/impact/kubernetes/MicrometerKubernetesMetricResolver.java b/core/src/main/java/tech/illuin/wombat/core/evaluation/impact/kubernetes/MicrometerKubernetesMetricResolver.java index 98836de..717d5fe 100644 --- a/core/src/main/java/tech/illuin/wombat/core/evaluation/impact/kubernetes/MicrometerKubernetesMetricResolver.java +++ b/core/src/main/java/tech/illuin/wombat/core/evaluation/impact/kubernetes/MicrometerKubernetesMetricResolver.java @@ -21,7 +21,7 @@ public class MicrometerKubernetesMetricResolver implements KubernetesMetricResol ); private static final Set TAGS = Set.of( - TAG_ENVIRONMENT, TAG_ASSET, TAG_ASSET_NAME, TAG_ASSET_TYPE, + TAG_ENVIRONMENT, TAG_ASSET, TAG_ASSET_TYPE, TAG_SERVICE, TAG_K8S_CLUSTER, TAG_K8S_NAMESPACE, TAG_K8S_POD, TAG_K8S_CONTAINER ); diff --git a/core/src/main/java/tech/illuin/wombat/core/evaluation/impact/llm/MicrometerLLMMetricResolver.java b/core/src/main/java/tech/illuin/wombat/core/evaluation/impact/llm/MicrometerLLMMetricResolver.java index 2d48a65..5ae1620 100644 --- a/core/src/main/java/tech/illuin/wombat/core/evaluation/impact/llm/MicrometerLLMMetricResolver.java +++ b/core/src/main/java/tech/illuin/wombat/core/evaluation/impact/llm/MicrometerLLMMetricResolver.java @@ -24,7 +24,7 @@ public class MicrometerLLMMetricResolver implements LLMMetricResolver ); private static final Set TAGS = Set.of( - TAG_ENVIRONMENT, TAG_ASSET, TAG_ASSET_NAME, TAG_ASSET_TYPE, + TAG_ENVIRONMENT, TAG_ASSET, TAG_ASSET_TYPE, TAG_SERVICE, TAG_LLM_PROVIDER, TAG_LLM_MODEL, TAG_LLM_LOCATION ); diff --git a/core/src/main/java/tech/illuin/wombat/core/source/persistence/micrometer/MicrometerTags.java b/core/src/main/java/tech/illuin/wombat/core/source/persistence/micrometer/MicrometerTags.java index d5169fd..e793f43 100644 --- a/core/src/main/java/tech/illuin/wombat/core/source/persistence/micrometer/MicrometerTags.java +++ b/core/src/main/java/tech/illuin/wombat/core/source/persistence/micrometer/MicrometerTags.java @@ -4,7 +4,6 @@ public final class MicrometerTags { public static final String TAG_ENVIRONMENT = "wombat.environment"; public static final String TAG_ASSET = "wombat.asset"; - public static final String TAG_ASSET_NAME = "wombat.asset.name"; public static final String TAG_ASSET_TYPE = "wombat.asset.type"; public static final String TAG_SERVICE = "wombat.service"; diff --git a/core/src/main/java/tech/illuin/wombat/core/source/persistence/micrometer/mapped/KubernetesMapper.java b/core/src/main/java/tech/illuin/wombat/core/source/persistence/micrometer/mapped/KubernetesMapper.java index 53373a0..e7ffd66 100644 --- a/core/src/main/java/tech/illuin/wombat/core/source/persistence/micrometer/mapped/KubernetesMapper.java +++ b/core/src/main/java/tech/illuin/wombat/core/source/persistence/micrometer/mapped/KubernetesMapper.java @@ -21,7 +21,6 @@ public List mapTags(AssetIdentity identity, AssetType type, MetricData data return List.of( Tag.of(TAG_ENVIRONMENT, identity.environmentId()), Tag.of(TAG_ASSET, identity.id()), - Tag.of(TAG_ASSET_NAME, identity.name()), Tag.of(TAG_ASSET_TYPE, type.name()), Tag.of(TAG_SERVICE, data.serviceId()), Tag.of(TAG_K8S_CLUSTER, k8sData.cluster()), diff --git a/core/src/main/java/tech/illuin/wombat/core/source/persistence/micrometer/mapped/LLMMapper.java b/core/src/main/java/tech/illuin/wombat/core/source/persistence/micrometer/mapped/LLMMapper.java index 9478d58..0238a04 100644 --- a/core/src/main/java/tech/illuin/wombat/core/source/persistence/micrometer/mapped/LLMMapper.java +++ b/core/src/main/java/tech/illuin/wombat/core/source/persistence/micrometer/mapped/LLMMapper.java @@ -21,7 +21,6 @@ public List mapTags(AssetIdentity identity, AssetType type, MetricData data return List.of( Tag.of(TAG_ENVIRONMENT, identity.environmentId()), Tag.of(TAG_ASSET, identity.id()), - Tag.of(TAG_ASSET_NAME, identity.name()), Tag.of(TAG_ASSET_TYPE, type.name()), Tag.of(TAG_SERVICE, data.serviceId()), Tag.of(TAG_LLM_PROVIDER, llmData.provider().name()), diff --git a/core/src/test/java/tech/illuin/wombat/core/WombatCoreTest.java b/core/src/test/java/tech/illuin/wombat/core/WombatCoreTest.java index 8a1c8ec..16910d8 100644 --- a/core/src/test/java/tech/illuin/wombat/core/WombatCoreTest.java +++ b/core/src/test/java/tech/illuin/wombat/core/WombatCoreTest.java @@ -216,7 +216,7 @@ private record SourceableAsset(String assetId) implements Asset, Monitorable @Override public AssetIdentity identity() { - return AssetIdentity.of(this.assetId, "env", this.assetId, this.type()); + return AssetIdentity.of(this.assetId, "env", this.type()); } @Override @@ -244,7 +244,7 @@ private record ModeledAsset(String assetId) implements Asset @Override public AssetIdentity identity() { - return AssetIdentity.of(this.assetId, "env", this.assetId, this.type()); + return AssetIdentity.of(this.assetId, "env", this.type()); } @Override diff --git a/core/src/test/java/tech/illuin/wombat/core/activity/kubernetes/KubernetesActivityResolverMicrometerTest.java b/core/src/test/java/tech/illuin/wombat/core/activity/kubernetes/KubernetesActivityResolverMicrometerTest.java index 62eb23f..116e5e9 100644 --- a/core/src/test/java/tech/illuin/wombat/core/activity/kubernetes/KubernetesActivityResolverMicrometerTest.java +++ b/core/src/test/java/tech/illuin/wombat/core/activity/kubernetes/KubernetesActivityResolverMicrometerTest.java @@ -186,7 +186,6 @@ private void recordK8sMetric(String assetId, String serviceId, String cluster, S Tags tags = Tags.of( TAG_ENVIRONMENT, "env-1", TAG_ASSET, assetId, - TAG_ASSET_NAME, assetId, TAG_ASSET_TYPE, "k8s", TAG_SERVICE, serviceId, TAG_K8S_CLUSTER, cluster, diff --git a/core/src/test/java/tech/illuin/wombat/core/activity/llm/LLMActivityResolverMicrometerTest.java b/core/src/test/java/tech/illuin/wombat/core/activity/llm/LLMActivityResolverMicrometerTest.java index 8086679..dd68575 100644 --- a/core/src/test/java/tech/illuin/wombat/core/activity/llm/LLMActivityResolverMicrometerTest.java +++ b/core/src/test/java/tech/illuin/wombat/core/activity/llm/LLMActivityResolverMicrometerTest.java @@ -240,7 +240,6 @@ private void recordLLMMetric(String assetId, String serviceId, LLMProvider provi Tags tags = Tags.of( TAG_ENVIRONMENT, "env-1", TAG_ASSET, assetId, - TAG_ASSET_NAME, assetId, TAG_ASSET_TYPE, "llm", TAG_SERVICE, serviceId, TAG_LLM_PROVIDER, provider.name(), diff --git a/core/src/test/java/tech/illuin/wombat/core/asset/AssetIdentityTest.java b/core/src/test/java/tech/illuin/wombat/core/asset/AssetIdentityTest.java index 3536d3a..3573369 100644 --- a/core/src/test/java/tech/illuin/wombat/core/asset/AssetIdentityTest.java +++ b/core/src/test/java/tech/illuin/wombat/core/asset/AssetIdentityTest.java @@ -17,52 +17,46 @@ class AssetIdentityTest @Test void of_constructsValidAssetIdentity() { - AssetIdentity identity = AssetIdentity.of("asset-1", "env-prod", "my-asset", TYPE_NAME); + AssetIdentity identity = AssetIdentity.of("asset-1", "env-prod", TYPE_NAME); assertEquals("asset-1", identity.id()); assertEquals("env-prod", identity.environmentId()); - assertEquals("my-asset", identity.name()); assertEquals(TYPE_NAME, identity.assetType()); } @Test void of_namesTheGivenAssetType() { - assertEquals(AssetIdentity.of("asset-1", "env-prod", "my-asset", TYPE_NAME), AssetIdentity.of("asset-1", "env-prod", "my-asset", TYPE)); + assertEquals(AssetIdentity.of("asset-1", "env-prod", TYPE_NAME), AssetIdentity.of("asset-1", "env-prod", TYPE)); } @Test void equalityAndHashCode_matchByValues() { - AssetIdentity id1 = AssetIdentity.of("asset-1", "env-prod", "my-asset", TYPE_NAME); - AssetIdentity id2 = new AssetIdentity("asset-1", "env-prod", "my-asset", TYPE_NAME); - AssetIdentity id3 = AssetIdentity.of("asset-2", "env-prod", "my-asset", TYPE_NAME); - AssetIdentity id4 = AssetIdentity.of("asset-1", "env-dev", "my-asset", TYPE_NAME); - AssetIdentity id5 = AssetIdentity.of("asset-1", "env-prod", "other-asset", TYPE_NAME); - AssetIdentity id6 = AssetIdentity.of("asset-1", "env-prod", "my-asset", "tech.illuin.wombat-module.other"); + AssetIdentity id1 = AssetIdentity.of("asset-1", "env-prod", TYPE_NAME); + AssetIdentity id2 = new AssetIdentity("asset-1", "env-prod", TYPE_NAME); + AssetIdentity id3 = AssetIdentity.of("asset-2", "env-prod", TYPE_NAME); + AssetIdentity id4 = AssetIdentity.of("asset-1", "env-dev", TYPE_NAME); + AssetIdentity id5 = AssetIdentity.of("asset-1", "env-prod", "tech.illuin.wombat-module.other"); assertEquals(id1, id2); assertEquals(id1.hashCode(), id2.hashCode()); assertNotEquals(id1, id3); assertNotEquals(id1, id4); assertNotEquals(id1, id5); - assertNotEquals(id1, id6); } @Test void constructor_rejectsNullOrBlankFields() { - assertThrows(NullPointerException.class, () -> new AssetIdentity(null, "env-prod", "my-asset", TYPE_NAME)); - assertThrows(NullPointerException.class, () -> new AssetIdentity("asset-1", null, "my-asset", TYPE_NAME)); - assertThrows(NullPointerException.class, () -> new AssetIdentity("asset-1", "env-prod", null, TYPE_NAME)); - assertThrows(NullPointerException.class, () -> new AssetIdentity("asset-1", "env-prod", "my-asset", null)); - - assertThrows(IllegalArgumentException.class, () -> new AssetIdentity("", "env-prod", "my-asset", TYPE_NAME)); - assertThrows(IllegalArgumentException.class, () -> new AssetIdentity(" ", "env-prod", "my-asset", TYPE_NAME)); - assertThrows(IllegalArgumentException.class, () -> new AssetIdentity("asset-1", "", "my-asset", TYPE_NAME)); - assertThrows(IllegalArgumentException.class, () -> new AssetIdentity("asset-1", " ", "my-asset", TYPE_NAME)); - assertThrows(IllegalArgumentException.class, () -> new AssetIdentity("asset-1", "env-prod", "", TYPE_NAME)); - assertThrows(IllegalArgumentException.class, () -> new AssetIdentity("asset-1", "env-prod", " ", TYPE_NAME)); - assertThrows(IllegalArgumentException.class, () -> new AssetIdentity("asset-1", "env-prod", "my-asset", "")); - assertThrows(IllegalArgumentException.class, () -> new AssetIdentity("asset-1", "env-prod", "my-asset", " ")); + assertThrows(NullPointerException.class, () -> new AssetIdentity(null, "env-prod", TYPE_NAME)); + assertThrows(NullPointerException.class, () -> new AssetIdentity("asset-1", null, TYPE_NAME)); + assertThrows(NullPointerException.class, () -> new AssetIdentity("asset-1", "env-prod", null)); + + assertThrows(IllegalArgumentException.class, () -> new AssetIdentity("", "env-prod", TYPE_NAME)); + assertThrows(IllegalArgumentException.class, () -> new AssetIdentity(" ", "env-prod", TYPE_NAME)); + assertThrows(IllegalArgumentException.class, () -> new AssetIdentity("asset-1", "", TYPE_NAME)); + assertThrows(IllegalArgumentException.class, () -> new AssetIdentity("asset-1", " ", TYPE_NAME)); + assertThrows(IllegalArgumentException.class, () -> new AssetIdentity("asset-1", "env-prod", "")); + assertThrows(IllegalArgumentException.class, () -> new AssetIdentity("asset-1", "env-prod", " ")); } } diff --git a/core/src/test/java/tech/illuin/wombat/core/connector/boavizta/impact/BoaviztaEvaluationResolverTest.java b/core/src/test/java/tech/illuin/wombat/core/connector/boavizta/impact/BoaviztaEvaluationResolverTest.java index 6811968..e3fc478 100644 --- a/core/src/test/java/tech/illuin/wombat/core/connector/boavizta/impact/BoaviztaEvaluationResolverTest.java +++ b/core/src/test/java/tech/illuin/wombat/core/connector/boavizta/impact/BoaviztaEvaluationResolverTest.java @@ -131,7 +131,7 @@ private record TestAsset(AssetType type, AssetProfile profile) implements Asset @Override public AssetIdentity identity() { - return AssetIdentity.of("asset", "env", "Asset", this.type()); + return AssetIdentity.of("asset", "env", this.type()); } } } diff --git a/core/src/test/java/tech/illuin/wombat/core/connector/ecologits/impact/EcologitsEvaluationResolverTest.java b/core/src/test/java/tech/illuin/wombat/core/connector/ecologits/impact/EcologitsEvaluationResolverTest.java index 2f7f7ef..e9d110a 100644 --- a/core/src/test/java/tech/illuin/wombat/core/connector/ecologits/impact/EcologitsEvaluationResolverTest.java +++ b/core/src/test/java/tech/illuin/wombat/core/connector/ecologits/impact/EcologitsEvaluationResolverTest.java @@ -118,7 +118,7 @@ private record TestAsset(AssetType type, AssetProfile profile) implements Asset @Override public AssetIdentity identity() { - return AssetIdentity.of("asset", "env", "Asset", this.type()); + return AssetIdentity.of("asset", "env", this.type()); } } } diff --git a/core/src/test/java/tech/illuin/wombat/core/evaluation/AssetEvaluatorTest.java b/core/src/test/java/tech/illuin/wombat/core/evaluation/AssetEvaluatorTest.java index dbcf543..36d3956 100644 --- a/core/src/test/java/tech/illuin/wombat/core/evaluation/AssetEvaluatorTest.java +++ b/core/src/test/java/tech/illuin/wombat/core/evaluation/AssetEvaluatorTest.java @@ -146,7 +146,7 @@ private record TestAsset(String assetId) implements Asset @Override public AssetIdentity identity() { - return AssetIdentity.of(this.assetId, "env", this.assetId, this.type()); + return AssetIdentity.of(this.assetId, "env", this.type()); } @Override diff --git a/core/src/test/java/tech/illuin/wombat/core/evaluation/impact/kubernetes/MicrometerKubernetesMetricResolverTest.java b/core/src/test/java/tech/illuin/wombat/core/evaluation/impact/kubernetes/MicrometerKubernetesMetricResolverTest.java index 0353bbb..67b03b1 100644 --- a/core/src/test/java/tech/illuin/wombat/core/evaluation/impact/kubernetes/MicrometerKubernetesMetricResolverTest.java +++ b/core/src/test/java/tech/illuin/wombat/core/evaluation/impact/kubernetes/MicrometerKubernetesMetricResolverTest.java @@ -112,7 +112,6 @@ void containerSharesPerBucket_withMissingServiceTag_ignoresGroup() Tags tagsWithoutService = Tags.of( TAG_ENVIRONMENT, "env-1", TAG_ASSET, "asset-1", - TAG_ASSET_NAME, "asset-1", TAG_ASSET_TYPE, "k8s", TAG_K8S_CLUSTER, "cluster-1", TAG_K8S_NAMESPACE, "ns-1", @@ -224,7 +223,6 @@ private void recordK8sMetric(String assetId, String serviceId, String cluster, S Tags tags = Tags.of( TAG_ENVIRONMENT, "env-1", TAG_ASSET, assetId, - TAG_ASSET_NAME, assetId, TAG_ASSET_TYPE, "k8s", TAG_SERVICE, serviceId, TAG_K8S_CLUSTER, cluster, diff --git a/core/src/test/java/tech/illuin/wombat/core/evaluation/impact/llm/MicrometerLLMMetricResolverTest.java b/core/src/test/java/tech/illuin/wombat/core/evaluation/impact/llm/MicrometerLLMMetricResolverTest.java index 7b8be5a..5e58004 100644 --- a/core/src/test/java/tech/illuin/wombat/core/evaluation/impact/llm/MicrometerLLMMetricResolverTest.java +++ b/core/src/test/java/tech/illuin/wombat/core/evaluation/impact/llm/MicrometerLLMMetricResolverTest.java @@ -65,7 +65,6 @@ void serviceActivitiesPerBucket_withMissingServiceTag_ignoresGroup() Tags tagsWithoutService = Tags.of( TAG_ENVIRONMENT, "env-1", TAG_ASSET, "asset-1", - TAG_ASSET_NAME, "asset-1", TAG_ASSET_TYPE, "llm", TAG_LLM_PROVIDER, LLMProvider.openai.name(), TAG_LLM_MODEL, "gpt-4o", @@ -83,7 +82,6 @@ void serviceActivitiesPerBucket_withInvalidCountryCode_handlesNullLocation() Tags tags = Tags.of( TAG_ENVIRONMENT, "env-1", TAG_ASSET, "asset-1", - TAG_ASSET_NAME, "asset-1", TAG_ASSET_TYPE, "llm", TAG_SERVICE, "service-1", TAG_LLM_PROVIDER, LLMProvider.openai.name(), @@ -147,7 +145,6 @@ private void recordLLMMetric(String assetId, String serviceId, LLMProvider provi Tags tags = Tags.of( TAG_ENVIRONMENT, "env-1", TAG_ASSET, assetId, - TAG_ASSET_NAME, assetId, TAG_ASSET_TYPE, "llm", TAG_SERVICE, serviceId, TAG_LLM_PROVIDER, provider.name(), diff --git a/core/src/test/java/tech/illuin/wombat/core/module/ProcessorPoolTest.java b/core/src/test/java/tech/illuin/wombat/core/module/ProcessorPoolTest.java index 04d4f71..256f66a 100644 --- a/core/src/test/java/tech/illuin/wombat/core/module/ProcessorPoolTest.java +++ b/core/src/test/java/tech/illuin/wombat/core/module/ProcessorPoolTest.java @@ -195,7 +195,7 @@ private record TestAsset(String assetId, AssetType type, String setting) impleme @Override public AssetIdentity identity() { - return AssetIdentity.of(this.assetId, "env", this.assetId, this.type); + return AssetIdentity.of(this.assetId, "env", this.type); } @Override diff --git a/core/src/test/java/tech/illuin/wombat/core/source/AssetMonitorTest.java b/core/src/test/java/tech/illuin/wombat/core/source/AssetMonitorTest.java index 00a15c8..4093f99 100644 --- a/core/src/test/java/tech/illuin/wombat/core/source/AssetMonitorTest.java +++ b/core/src/test/java/tech/illuin/wombat/core/source/AssetMonitorTest.java @@ -296,7 +296,7 @@ private record SettingAsset(String assetId, String setting) implements Asset, Mo @Override public AssetIdentity identity() { - return AssetIdentity.of(this.assetId, "env", this.assetId, this.type()); + return AssetIdentity.of(this.assetId, "env", this.type()); } @Override @@ -323,7 +323,7 @@ private record TestAsset(String assetId, AssetType type, Period period) implemen @Override public AssetIdentity identity() { - return AssetIdentity.of(this.assetId, "env", this.assetId, this.type()); + return AssetIdentity.of(this.assetId, "env", this.type()); } @Override diff --git a/core/src/test/java/tech/illuin/wombat/core/source/persistence/micrometer/mapped/KubernetesMapperTest.java b/core/src/test/java/tech/illuin/wombat/core/source/persistence/micrometer/mapped/KubernetesMapperTest.java index f5364cc..0f22a56 100644 --- a/core/src/test/java/tech/illuin/wombat/core/source/persistence/micrometer/mapped/KubernetesMapperTest.java +++ b/core/src/test/java/tech/illuin/wombat/core/source/persistence/micrometer/mapped/KubernetesMapperTest.java @@ -20,7 +20,7 @@ class KubernetesMapperTest { private static final AssetType TYPE_KUBERNETES = AssetType.of("tech.illuin", "wombat-module", "kubernetes-prometheus", ActivityRegime.MEASURED, ServiceFamily.KUBERNETES_CONTAINER); - private static final AssetIdentity IDENTITY = AssetIdentity.of("asset-1", "env-1", "Asset 1", TYPE_KUBERNETES); + private static final AssetIdentity IDENTITY = AssetIdentity.of("asset-1", "env-1", TYPE_KUBERNETES); private final KubernetesMapper mapper = new KubernetesMapper(); @@ -32,7 +32,6 @@ void mapTags_includesClusterNamespacePodContainer() assertTrue(tags.contains(Tag.of(TAG_ENVIRONMENT, "env-1"))); assertTrue(tags.contains(Tag.of(TAG_ASSET, "asset-1"))); - assertTrue(tags.contains(Tag.of(TAG_ASSET_NAME, "Asset 1"))); assertTrue(tags.contains(Tag.of(TAG_ASSET_TYPE, TYPE_KUBERNETES.name()))); assertTrue(tags.contains(Tag.of(TAG_SERVICE, "container-1"))); assertTrue(tags.contains(Tag.of(TAG_K8S_CLUSTER, "cluster-prod"))); diff --git a/core/src/test/java/tech/illuin/wombat/core/source/persistence/micrometer/mapped/LLMMapperTest.java b/core/src/test/java/tech/illuin/wombat/core/source/persistence/micrometer/mapped/LLMMapperTest.java index b71fd0c..2f12628 100644 --- a/core/src/test/java/tech/illuin/wombat/core/source/persistence/micrometer/mapped/LLMMapperTest.java +++ b/core/src/test/java/tech/illuin/wombat/core/source/persistence/micrometer/mapped/LLMMapperTest.java @@ -22,7 +22,7 @@ class LLMMapperTest { private static final AssetType TYPE_LLM = AssetType.of("tech.illuin", "wombat-module", "llm-prometheus", ActivityRegime.MEASURED, ServiceFamily.LLM); - private static final AssetIdentity IDENTITY = AssetIdentity.of("asset-1", "env-1", "Asset 1", TYPE_LLM); + private static final AssetIdentity IDENTITY = AssetIdentity.of("asset-1", "env-1", TYPE_LLM); private final LLMMapper mapper = new LLMMapper(); @@ -34,7 +34,6 @@ void mapTags_includesProviderModelLocation() assertTrue(tags.contains(Tag.of(TAG_ENVIRONMENT, "env-1"))); assertTrue(tags.contains(Tag.of(TAG_ASSET, "asset-1"))); - assertTrue(tags.contains(Tag.of(TAG_ASSET_NAME, "Asset 1"))); assertTrue(tags.contains(Tag.of(TAG_ASSET_TYPE, TYPE_LLM.name()))); assertTrue(tags.contains(Tag.of(TAG_SERVICE, "service-1"))); assertTrue(tags.contains(Tag.of(TAG_LLM_PROVIDER, "mistralai"))); diff --git a/doc/module/kubernetes-api.md b/doc/module/kubernetes-api.md index 79e00e6..bceee55 100644 --- a/doc/module/kubernetes-api.md +++ b/doc/module/kubernetes-api.md @@ -25,7 +25,6 @@ For cross-cutting data formats such as `Period`, `Duration`, `Lifetime`, `Countr ```yaml id: "k8s-prod-cluster-01" # required - Unique identifier for the monitored asset. environment-id: "production" # required - Identifier of the target environment (e.g. `production`, `staging`). -name: "Production Primary K8s Cluster" # required - Human-readable asset name. config-path: "/etc/wombat/kubeconfig" # required - Absolute or relative file path to the kubeconfig file. namespace: "payments-api" # optional (default: null) - Kubernetes namespace to restrict metric polling (polls all namespaces if omitted). context: "prod-cluster-ctx" # optional (default: active context) - Kubeconfig context name to target. @@ -45,7 +44,6 @@ A minimal configuration monitoring a single local or standard Kubernetes cluster ```yaml id: "k8s-prod-cluster-01" environment-id: "production" -name: "Production Primary K8s Cluster" config-path: "/etc/wombat/kubeconfig" period: "5m" profile: @@ -70,7 +68,6 @@ The scenario below demonstrates: # Asset 1: AWS EKS Payments Service Cluster id: "k8s-aws-fra-payments" environment-id: "production-eu" -name: "AWS EKS Payments Cluster" config-path: "/var/secrets/k8s/kubeconfig-enterprise.yaml" context: "arn:aws:eks:eu-west-3:123456789012:cluster/prod-fra-payments" namespace: "payments-api" @@ -87,7 +84,6 @@ profile: # Asset 2: GCP GKE Analytics & Batch Cluster id: "k8s-gcp-deu-analytics" environment-id: "production-eu" -name: "GCP GKE Analytics Processing Cluster" config-path: "/var/secrets/k8s/kubeconfig-enterprise.yaml" context: "gke_enterprise-analytics_europe-west3_prod-batch-cluster" read-timeout: "PT15S" diff --git a/doc/module/kubernetes-static.md b/doc/module/kubernetes-static.md index 3d4e6be..d9403ec 100644 --- a/doc/module/kubernetes-static.md +++ b/doc/module/kubernetes-static.md @@ -27,7 +27,6 @@ For cross-cutting data formats such as `Duration`, `Lifetime`, `Country`, `Serve ```yaml id: "k8s-static-backend" # required - Unique identifier for the asset. environment-id: "production" # required - Identifier of the environment (e.g. `production`, `simulation`). -name: "Static Backend Service" # required - Human-readable asset name. profile: # required - Static profile configuration. provider: "aws" # required - Infrastructure provider (`aws`, `azure`, `gcp`, `ovhcloud`, `scaleway`). instance-type: "c5.2xlarge" # required - Machine instance type (e.g. `c5.2xlarge`, `n2-standard-8`). @@ -71,7 +70,6 @@ A minimal configuration modeling a single node with a static 20% constant baseli ```yaml id: "k8s-static-backend" environment-id: "production" -name: "Static Backend Service" profile: provider: "aws" instance-type: "c5.xlarge" @@ -97,7 +95,6 @@ In a realistic SaaS deployment, a 3-node Kubernetes cluster experiences multiple ```yaml id: "k8s-saas-prod-cluster" environment-id: "production" -name: "Production SaaS Application Cluster" profile: provider: "gcp" instance-type: "n2-standard-8" diff --git a/doc/module/llm-anthropic.md b/doc/module/llm-anthropic.md index 95a51a9..dfe1154 100644 --- a/doc/module/llm-anthropic.md +++ b/doc/module/llm-anthropic.md @@ -27,7 +27,6 @@ For cross-cutting data formats such as `Country`, refer to the [Generic Type Glo ```yaml id: "anthropic-org" # required - Unique identifier for the asset. environment-id: "production" # required - Identifier of the environment (e.g. `production`, `staging`). -name: "Anthropic Organization" # required - Human-readable asset name. admin-key: "secrets.anthropic.admin-key" # required - Secret resolver key for the Anthropic Admin API key (`sk-ant-admin...`); a standard API key is rejected by the usage report endpoint. api-url: "https://api.anthropic.com" # optional (default: https://api.anthropic.com) - Base URL of the Anthropic API. proxy-url: "http://proxy.corp.internal:8080" # optional (default: null) - HTTP corporate proxy URL; must include a host and a port. @@ -56,7 +55,6 @@ A minimal configuration accounting for the whole Anthropic organization, with th ```yaml id: "anthropic-org" environment-id: "production" -name: "Anthropic Organization" admin-key: "secrets.anthropic.admin-key" profile: location: "USA" @@ -78,7 +76,6 @@ The example below demonstrates: # Asset 1: Customer Support Assistant Workspace id: "anthropic-support" environment-id: "production" -name: "Anthropic - Customer Support Assistant" admin-key: "secrets.anthropic.admin-key" proxy-url: "http://proxy.corp.internal:8080" profile: @@ -94,7 +91,6 @@ profile: # Asset 2: R&D Agents API Keys id: "anthropic-research" environment-id: "production" -name: "Anthropic - R&D Agents" admin-key: "secrets.anthropic.admin-key" proxy-url: "http://proxy.corp.internal:8080" profile: diff --git a/doc/module/llm-prometheus.md b/doc/module/llm-prometheus.md index 727c188..ec554a5 100644 --- a/doc/module/llm-prometheus.md +++ b/doc/module/llm-prometheus.md @@ -25,7 +25,6 @@ For cross-cutting data formats such as `Period`, `Country`, and `LLMProvider`, r ```yaml id: "vllm-mistral-7b" # required - Unique identifier for the asset. environment-id: "production" # required - Identifier of the environment (e.g. `production`, `staging`). -name: "Self-Hosted Mistral 7B Service" # required - Human-readable asset name. prometheus-url: "http://prometheus.internal:9090" # required - Base HTTP/HTTPS URL of the Prometheus server. proxy-url: "http://proxy.corp.internal:8080" # optional (default: null) - HTTP/HTTPS corporate proxy URL if routing through an outbound proxy. username: "wombat-agent" # optional (default: null) - Basic authentication username. @@ -46,7 +45,6 @@ A minimal configuration scraping output token generation from a local vLLM insta ```yaml id: "vllm-mistral-7b" environment-id: "production" -name: "Self-Hosted Mistral 7B Service" prometheus-url: "http://prometheus.internal:9090" period: "5m" profile: @@ -72,7 +70,6 @@ The example below demonstrates: # Asset 1: Meta Llama-3-70B Service on Enterprise Gateway id: "gateway-llama3-70b" environment-id: "production" -name: "Enterprise Gateway - Llama 3 70B" prometheus-url: "https://prometheus-mon.corp.internal:9090" proxy-url: "http://proxy.corp.internal:8080" username: "wombat-agent" @@ -90,7 +87,6 @@ profile: # Asset 2: Mistral Large Endpoint id: "gateway-mistral-large" environment-id: "production" -name: "Enterprise Gateway - Mistral Large" prometheus-url: "https://prometheus-mon.corp.internal:9090" proxy-url: "http://proxy.corp.internal:8080" username: "wombat-agent" diff --git a/doc/module/llm-static.md b/doc/module/llm-static.md index d06adb8..f0b91f9 100644 --- a/doc/module/llm-static.md +++ b/doc/module/llm-static.md @@ -27,7 +27,6 @@ For cross-cutting data formats such as `Duration`, `Country`, `LLMProvider`, `Zo ```yaml id: "llm-static-assistant" # required - Unique identifier for the asset. environment-id: "production" # required - Identifier of the environment (e.g. `production`, `planning`). -name: "Enterprise Multi-Model Assistant" # required - Human-readable asset name. profile: # required - Multi-model profile configuration. zone-id: "UTC" # optional (default: UTC) - Default timezone for scenario schedule evaluation (e.g. `UTC`, `Europe/Paris`). models: # required - List of foundation models and their respective scenarios. @@ -71,7 +70,6 @@ A minimal configuration modeling a constant chatbot service using OpenAI `gpt-5. ```yaml id: "llm-static-chatbot" environment-id: "production" -name: "Customer Support Chatbot" profile: zone-id: "UTC" models: @@ -96,7 +94,6 @@ Modern enterprise AI platforms distribute tasks across specialized models: ```yaml id: "enterprise-ai-platform" environment-id: "production" -name: "Corporate Multi-Model AI Platform" profile: zone-id: "Europe/Paris" models: diff --git a/doc/module/llm-vertexai.md b/doc/module/llm-vertexai.md index 11f59cf..f19f06f 100644 --- a/doc/module/llm-vertexai.md +++ b/doc/module/llm-vertexai.md @@ -44,7 +44,6 @@ For cross-cutting data formats such as `Country` and `LLMProvider`, refer to the ```yaml id: "vertex-gemini-flash" # required - Unique identifier for the asset. environment-id: "production" # required - Identifier of the environment (e.g. `production`, `staging`). -name: "Vertex AI" # required - Human-readable asset name. google-url: "https://monitoring.googleapis.com" # `String`, Required - Base URL of the Cloud Monitoring API. resource-name: "projects/my-gcp-project" # `String`, Required - projects/, folders/, or organizations/. credentials-key: "secrets.google.service-account" # `String`, Optional(default: null) - Secret resolver key for a service-account JSON key. Falls back to Application Default Credentials when omitted. @@ -62,7 +61,6 @@ A minimal configuration resolving Gemini output tokens using Application Default ```yaml id: "vertex-gemini-flash" environment-id: "production" -name: "Vertex AI - Gemini 2.0 Flash" google-url: "https://monitoring.googleapis.com" resource-name: "projects/my-gcp-project" profile: @@ -81,7 +79,6 @@ The example below tracks two models as separate services under one asset. Both u ```yaml id: "vertex-gemini" environment-id: "production" -name: "Vertex AI - Gemini" google-url: "https://monitoring.googleapis.com" resource-name: "projects/corp-ai-platform" credentials-key: "secrets.google.wombat-reader" diff --git a/doc/type-glossary.md b/doc/type-glossary.md index 3f8307f..884bb88 100644 --- a/doc/type-glossary.md +++ b/doc/type-glossary.md @@ -30,7 +30,7 @@ This is critical for internal orchestration purposes but also communicated in ou It is currently composed of the following properties: - the asset `id` - the asset `environmentId` -- the asset `name` +- the asset `type`, see [`AssetType`](#assettype) ## 2. Temporal & Time Types diff --git a/module/src/test/java/tech/illuin/wombat/module/AssetJsonTest.java b/module/src/test/java/tech/illuin/wombat/module/AssetJsonTest.java index 3e9df4e..1ee676b 100644 --- a/module/src/test/java/tech/illuin/wombat/module/AssetJsonTest.java +++ b/module/src/test/java/tech/illuin/wombat/module/AssetJsonTest.java @@ -17,6 +17,7 @@ import java.util.List; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertInstanceOf; /** @@ -27,12 +28,13 @@ class AssetJsonTest private static final String TYPE = LLMStaticModule.TYPE.name(); private static final LLMStaticAsset ASSET = new LLMStaticAsset( - AssetIdentity.of("llm", "env", "LLM", LLMStaticModule.TYPE), + AssetIdentity.of("llm", "env", LLMStaticModule.TYPE), new LLMStaticProfile(List.of(new LLMStaticProfile.ModelConfig( LLMProvider.mistralai, "mistral-large-latest", Country.FRANCE, List.of(new ConstantScenario(500, 1000, null)) ))) ); + /** The payload still carries a {@code name}, as assets persisted before it was dropped from the identity do. */ @Test void read_fillsTheIdentityTypeFromTheTypeProperty() throws Exception { @@ -54,7 +56,7 @@ void read_fillsTheIdentityTypeFromTheTypeProperty() throws Exception """.formatted(TYPE), Asset.class); LLMStaticAsset read = assertInstanceOf(LLMStaticAsset.class, asset); - assertEquals(AssetIdentity.of("llm", "env", "LLM", TYPE), read.identity()); + assertEquals(AssetIdentity.of("llm", "env", TYPE), read.identity()); } @Test @@ -65,6 +67,7 @@ void write_emitsTheTypePropertyOnce() throws Exception JsonNode node = mapper.readTree(json); assertEquals(TYPE, node.get("type").asText()); + assertFalse(node.has("name")); assertEquals(1, json.split("\"type\":\"" + TYPE + "\"", -1).length - 1); assertEquals(ASSET, mapper.readValue(json, Asset.class)); } diff --git a/module/src/test/java/tech/illuin/wombat/module/kubernetes_api/KubernetesAPIModuleTest.java b/module/src/test/java/tech/illuin/wombat/module/kubernetes_api/KubernetesAPIModuleTest.java index 4a43444..61ea4bd 100644 --- a/module/src/test/java/tech/illuin/wombat/module/kubernetes_api/KubernetesAPIModuleTest.java +++ b/module/src/test/java/tech/illuin/wombat/module/kubernetes_api/KubernetesAPIModuleTest.java @@ -71,7 +71,7 @@ void closingTheSourceClosesItsClient() private static KubernetesAPIAsset asset(Path kubeconfig) { return new KubernetesAPIAsset( - AssetIdentity.of("k", "env", "K", KubernetesAPIModule.TYPE), + AssetIdentity.of("k", "env", KubernetesAPIModule.TYPE), kubeconfig.toString(), "default", Optional.empty(), Optional.empty(), Period.ZERO, null ); } diff --git a/module/src/test/java/tech/illuin/wombat/module/kubernetes_static/activity/KubernetesStaticActivityResolverTest.java b/module/src/test/java/tech/illuin/wombat/module/kubernetes_static/activity/KubernetesStaticActivityResolverTest.java index 1616bd3..76f307e 100644 --- a/module/src/test/java/tech/illuin/wombat/module/kubernetes_static/activity/KubernetesStaticActivityResolverTest.java +++ b/module/src/test/java/tech/illuin/wombat/module/kubernetes_static/activity/KubernetesStaticActivityResolverTest.java @@ -35,7 +35,7 @@ public class KubernetesStaticActivityResolverTest void resolvesConstantLoadIntoRelativeUsage() { KubernetesStaticAsset asset = new KubernetesStaticAsset( - AssetIdentity.of("k8s-static-1", "env-test", "Static Cluster 1", KubernetesStaticModule.TYPE), + AssetIdentity.of("k8s-static-1", "env-test", KubernetesStaticModule.TYPE), new KubernetesStaticProfile( ServerProvider.aws, "m5.xlarge", @@ -72,7 +72,7 @@ void resolvesSuperposedScenariosAcrossTimeSlots() { // Combine baseline (0.10), diurnal (0.10 -> 0.75, 09:00 - 18:00), batch (0.0 -> 0.90, 02:00 - 04:00) KubernetesStaticAsset asset = new KubernetesStaticAsset( - AssetIdentity.of("k8s-static-2", "env-test", "Static Cluster 2", KubernetesStaticModule.TYPE), + AssetIdentity.of("k8s-static-2", "env-test", KubernetesStaticModule.TYPE), new KubernetesStaticProfile( ServerProvider.aws, "c5.2xlarge", @@ -114,7 +114,7 @@ void resolvesSuperposedScenariosAcrossTimeSlots() void resolvesActivityForMultiNodeClusterWithoutPreMultiplyingLoad() { KubernetesStaticAsset asset = new KubernetesStaticAsset( - AssetIdentity.of("k8s-static-3", "env-test", "Multi-Node Static Cluster", KubernetesStaticModule.TYPE), + AssetIdentity.of("k8s-static-3", "env-test", KubernetesStaticModule.TYPE), new KubernetesStaticProfile( ServerProvider.aws, "m5.2xlarge", @@ -146,7 +146,7 @@ void resolvesActivityForMultiNodeClusterWithoutPreMultiplyingLoad() void resolvesDailyResolutionWithHourlySampling() { KubernetesStaticAsset asset = new KubernetesStaticAsset( - AssetIdentity.of("k8s-static-daily", "env-test", "Daily Static Cluster", KubernetesStaticModule.TYPE), + AssetIdentity.of("k8s-static-daily", "env-test", KubernetesStaticModule.TYPE), new KubernetesStaticProfile( ServerProvider.aws, "c5.2xlarge", diff --git a/module/src/test/java/tech/illuin/wombat/module/llm_anthropic/LLMAnthropicModuleTest.java b/module/src/test/java/tech/illuin/wombat/module/llm_anthropic/LLMAnthropicModuleTest.java index c3ee0a3..8bedef4 100644 --- a/module/src/test/java/tech/illuin/wombat/module/llm_anthropic/LLMAnthropicModuleTest.java +++ b/module/src/test/java/tech/illuin/wombat/module/llm_anthropic/LLMAnthropicModuleTest.java @@ -66,7 +66,7 @@ private static WombatServices services(Map environment) private static LLMAnthropicAsset asset() { return new LLMAnthropicAsset( - AssetIdentity.of("a", "env", "A", LLMAnthropicModule.TYPE), null, null, "ANTHROPIC_ADMIN_KEY", + AssetIdentity.of("a", "env", LLMAnthropicModule.TYPE), null, null, "ANTHROPIC_ADMIN_KEY", new LLMAnthropicProfile(FRANCE, 500, null, null, null) ); } diff --git a/module/src/test/java/tech/illuin/wombat/module/llm_anthropic/activity/LLMAnthropicActivityResolverTest.java b/module/src/test/java/tech/illuin/wombat/module/llm_anthropic/activity/LLMAnthropicActivityResolverTest.java index 8b89bfe..dc6ad65 100644 --- a/module/src/test/java/tech/illuin/wombat/module/llm_anthropic/activity/LLMAnthropicActivityResolverTest.java +++ b/module/src/test/java/tech/illuin/wombat/module/llm_anthropic/activity/LLMAnthropicActivityResolverTest.java @@ -40,7 +40,7 @@ class LLMAnthropicActivityResolverTest private final AnthropicAdminClient client = mock(AnthropicAdminClient.class); private final LLMAnthropicAsset asset = new LLMAnthropicAsset( - AssetIdentity.of("claude", "prod", "Claude", LLMAnthropicModule.TYPE), null, null, "ANTHROPIC_ADMIN_KEY", + AssetIdentity.of("claude", "prod", LLMAnthropicModule.TYPE), null, null, "ANTHROPIC_ADMIN_KEY", new LLMAnthropicProfile(FRANCE, 500, List.of("claude-opus-5-5"), null, null) ); private final LLMAnthropicActivityResolver resolver = new LLMAnthropicActivityResolver(this.client); diff --git a/module/src/test/java/tech/illuin/wombat/module/llm_anthropic/connector/AnthropicClientConfigTest.java b/module/src/test/java/tech/illuin/wombat/module/llm_anthropic/connector/AnthropicClientConfigTest.java index af43b87..6f5b4d3 100644 --- a/module/src/test/java/tech/illuin/wombat/module/llm_anthropic/connector/AnthropicClientConfigTest.java +++ b/module/src/test/java/tech/illuin/wombat/module/llm_anthropic/connector/AnthropicClientConfigTest.java @@ -55,7 +55,7 @@ void sendsAdminHeadersAndExpandsArrayParameters() }; LLMAnthropicAsset asset = new LLMAnthropicAsset( - AssetIdentity.of("claude", "prod", "Claude", LLMAnthropicModule.TYPE), null, null, "ANTHROPIC_ADMIN_KEY", + AssetIdentity.of("claude", "prod", LLMAnthropicModule.TYPE), null, null, "ANTHROPIC_ADMIN_KEY", new LLMAnthropicProfile(FRANCE, 500, null, null, null) ); EnvironmentSecretResolver secrets = new EnvironmentSecretResolver(Map.of("ANTHROPIC_ADMIN_KEY", "sk-ant-admin-test")::get); diff --git a/module/src/test/java/tech/illuin/wombat/module/llm_prometheus/LLMPrometheusAssetTest.java b/module/src/test/java/tech/illuin/wombat/module/llm_prometheus/LLMPrometheusAssetTest.java index ceabc19..5b1a450 100644 --- a/module/src/test/java/tech/illuin/wombat/module/llm_prometheus/LLMPrometheusAssetTest.java +++ b/module/src/test/java/tech/illuin/wombat/module/llm_prometheus/LLMPrometheusAssetTest.java @@ -47,7 +47,7 @@ void aUsernameWithoutAPasswordVariableIsRejected() private static LLMPrometheusAsset asset(String username, String passwordEnv) { return new LLMPrometheusAsset( - AssetIdentity.of("p", "env", "P", LLMPrometheusModule.TYPE), "http://prometheus", null, username, passwordEnv, Period.ZERO, + AssetIdentity.of("p", "env", LLMPrometheusModule.TYPE), "http://prometheus", null, username, passwordEnv, Period.ZERO, new LLMPrometheusProfile(LLMProvider.mistralai, "m", FRANCE, new LLMPrometheusProfile.DynamicProfile("q")) ); } diff --git a/module/src/test/java/tech/illuin/wombat/module/llm_prometheus/LLMPrometheusModuleTest.java b/module/src/test/java/tech/illuin/wombat/module/llm_prometheus/LLMPrometheusModuleTest.java index 97be7d3..e23cc8f 100644 --- a/module/src/test/java/tech/illuin/wombat/module/llm_prometheus/LLMPrometheusModuleTest.java +++ b/module/src/test/java/tech/illuin/wombat/module/llm_prometheus/LLMPrometheusModuleTest.java @@ -59,7 +59,7 @@ private static WombatServices services(Map environment) private static LLMPrometheusAsset asset(String username, String passwordEnv) { return new LLMPrometheusAsset( - AssetIdentity.of("p", "env", "P", LLMPrometheusModule.TYPE), + AssetIdentity.of("p", "env", LLMPrometheusModule.TYPE), "http://prometheus", null, username, passwordEnv, Period.ZERO, new LLMPrometheusProfile(LLMProvider.mistralai, "m", FRANCE, new LLMPrometheusProfile.DynamicProfile("q")) ); diff --git a/module/src/test/java/tech/illuin/wombat/module/llm_prometheus/connector/PrometheusClientConfigTest.java b/module/src/test/java/tech/illuin/wombat/module/llm_prometheus/connector/PrometheusClientConfigTest.java index 98a0221..6115152 100644 --- a/module/src/test/java/tech/illuin/wombat/module/llm_prometheus/connector/PrometheusClientConfigTest.java +++ b/module/src/test/java/tech/illuin/wombat/module/llm_prometheus/connector/PrometheusClientConfigTest.java @@ -53,7 +53,7 @@ private static SecretResolver secrets(Map environment) private static LLMPrometheusAsset asset(String id, String username, String passwordEnv) { return new LLMPrometheusAsset( - AssetIdentity.of(id, "env", id, LLMPrometheusModule.TYPE), + AssetIdentity.of(id, "env", LLMPrometheusModule.TYPE), "http://prometheus", null, username, passwordEnv, Period.ZERO, new LLMPrometheusProfile(LLMProvider.mistralai, "m", FRANCE, new LLMPrometheusProfile.DynamicProfile("q")) ); diff --git a/module/src/test/java/tech/illuin/wombat/module/llm_prometheus/source/LLMPrometheusSourceTest.java b/module/src/test/java/tech/illuin/wombat/module/llm_prometheus/source/LLMPrometheusSourceTest.java index c1ef958..ac701a2 100644 --- a/module/src/test/java/tech/illuin/wombat/module/llm_prometheus/source/LLMPrometheusSourceTest.java +++ b/module/src/test/java/tech/illuin/wombat/module/llm_prometheus/source/LLMPrometheusSourceTest.java @@ -36,7 +36,7 @@ void sample_emitsLLMDataWithProviderModelAndLocation() new LLMPrometheusProfile.DynamicProfile("sum(vllm:num_tokens_total)") ); LLMPrometheusAsset asset = new LLMPrometheusAsset( - AssetIdentity.of("llm-prom", "prod", "Prom LLM", LLMPrometheusModule.TYPE), + AssetIdentity.of("llm-prom", "prod", LLMPrometheusModule.TYPE), "http://localhost:9090", null, null, null, Period.ZERO, profile ); diff --git a/module/src/test/java/tech/illuin/wombat/module/llm_static/activity/LLMStaticActivityResolverTest.java b/module/src/test/java/tech/illuin/wombat/module/llm_static/activity/LLMStaticActivityResolverTest.java index b0f2307..69c0096 100644 --- a/module/src/test/java/tech/illuin/wombat/module/llm_static/activity/LLMStaticActivityResolverTest.java +++ b/module/src/test/java/tech/illuin/wombat/module/llm_static/activity/LLMStaticActivityResolverTest.java @@ -53,7 +53,7 @@ void resolve_multiModelStaticProfile_computesActivityForEachModel() ); LLMStaticProfile profile = new LLMStaticProfile(List.of(m1, m2)); - LLMStaticAsset asset = new LLMStaticAsset(AssetIdentity.of("llm-asset", "test-env", "Test Static Asset", LLMStaticModule.TYPE), profile); + LLMStaticAsset asset = new LLMStaticAsset(AssetIdentity.of("llm-asset", "test-env", LLMStaticModule.TYPE), profile); // 100 seconds range TimeRange range = new TimeRange(Instant.ofEpochSecond(0), Instant.ofEpochSecond(100)); @@ -89,7 +89,7 @@ void resolve_multiModelStaticProfile_computesActivityForEachModel() void resolvesConstantScenarioAcrossTimeSlots() { LLMStaticAsset asset = new LLMStaticAsset( - AssetIdentity.of("llm-static-1", "env-test", "Static LLM 1", LLMStaticModule.TYPE), + AssetIdentity.of("llm-static-1", "env-test", LLMStaticModule.TYPE), new LLMStaticProfile( LLMProvider.openai, "gpt-4o", @@ -130,7 +130,7 @@ void resolvesSuperposedScenariosAcrossTimeSlots() int batchTotalRequests = (int) (63_072_000 * (2.0 / 24.0) * 1.0); LLMStaticAsset asset = new LLMStaticAsset( - AssetIdentity.of("llm-static-2", "env-test", "Static LLM 2", LLMStaticModule.TYPE), + AssetIdentity.of("llm-static-2", "env-test", LLMStaticModule.TYPE), new LLMStaticProfile( LLMProvider.openai, "gpt-4o", @@ -189,7 +189,7 @@ void resolvesFilteredModelsWithAssetFilter() ); LLMStaticProfile profile = new LLMStaticProfile(List.of(m1, m2)); - LLMStaticAsset asset = new LLMStaticAsset(AssetIdentity.of("llm-asset", "test-env", "Test Static Asset", LLMStaticModule.TYPE), profile); + LLMStaticAsset asset = new LLMStaticAsset(AssetIdentity.of("llm-asset", "test-env", LLMStaticModule.TYPE), profile); TimeRange range = new TimeRange(Instant.ofEpochSecond(0), Instant.ofEpochSecond(100)); AssetFilter filter = new AssetFilter(new AssetFilter.Environment("test-env", Set.of(new AssetFilter.Asset("llm-asset", Set.of("mistral-large-latest"))))); @@ -211,7 +211,7 @@ void resolvesDailyResolutionWithHourlySampling() int userTotalRequests = (int) (31_536_000 * (9.0 / 24.0) * (2.0 / Math.PI)); LLMStaticAsset asset = new LLMStaticAsset( - AssetIdentity.of("llm-static-daily", "env-test", "Daily Static LLM", LLMStaticModule.TYPE), + AssetIdentity.of("llm-static-daily", "env-test", LLMStaticModule.TYPE), new LLMStaticProfile( LLMProvider.openai, "gpt-4o", @@ -262,7 +262,7 @@ void resolvesDailyResolutionWithHourlySampling() void resolvesSevenDayAggregateBatchActivityScenario() { LLMStaticAsset asset = new LLMStaticAsset( - AssetIdentity.of("llm-batch-7d", "env-test", "Batch 7D Asset", LLMStaticModule.TYPE), + AssetIdentity.of("llm-batch-7d", "env-test", LLMStaticModule.TYPE), new LLMStaticProfile( LLMProvider.openai, "gpt-4o", @@ -294,7 +294,7 @@ void resolvesFullYearSummationForUserActivityScenario() { int targetAnnualRequests = 100_000; LLMStaticAsset asset = new LLMStaticAsset( - AssetIdentity.of("llm-user-year", "env-test", "User Year Asset", LLMStaticModule.TYPE), + AssetIdentity.of("llm-user-year", "env-test", LLMStaticModule.TYPE), new LLMStaticProfile( LLMProvider.openai, "gpt-4o", @@ -325,7 +325,7 @@ void resolvesFullYearSummationForBatchActivityScenario() { int targetAnnualRequests = 50_000; LLMStaticAsset asset = new LLMStaticAsset( - AssetIdentity.of("llm-batch-year", "env-test", "Batch Year Asset", LLMStaticModule.TYPE), + AssetIdentity.of("llm-batch-year", "env-test", LLMStaticModule.TYPE), new LLMStaticProfile( LLMProvider.openai, "gpt-4o", @@ -357,7 +357,7 @@ void resolvesFullYearSummationWithMonthApplicabilityFilter() ApplicabilityFilter janFilter = new ApplicabilityFilter(Set.of(), Set.of(JANUARY)); LLMStaticAsset asset = new LLMStaticAsset( - AssetIdentity.of("llm-jan-asset", "env-test", "Jan Only Asset", LLMStaticModule.TYPE), + AssetIdentity.of("llm-jan-asset", "env-test", LLMStaticModule.TYPE), new LLMStaticProfile( LLMProvider.openai, "gpt-4o", @@ -402,7 +402,7 @@ void resolvesFullYearSummationWithWeekdayApplicabilityFilter() ); LLMStaticAsset asset = new LLMStaticAsset( - AssetIdentity.of("llm-weekday-asset", "env-test", "Weekday Asset", LLMStaticModule.TYPE), + AssetIdentity.of("llm-weekday-asset", "env-test", LLMStaticModule.TYPE), new LLMStaticProfile( LLMProvider.openai, "gpt-4o", diff --git a/module/src/test/java/tech/illuin/wombat/module/llm_vertexai/LLMVertexAIAssetTest.java b/module/src/test/java/tech/illuin/wombat/module/llm_vertexai/LLMVertexAIAssetTest.java index 68d30eb..69890c2 100644 --- a/module/src/test/java/tech/illuin/wombat/module/llm_vertexai/LLMVertexAIAssetTest.java +++ b/module/src/test/java/tech/illuin/wombat/module/llm_vertexai/LLMVertexAIAssetTest.java @@ -47,7 +47,7 @@ void declaresTheLLMVertexAIAssetType() private static LLMVertexAIAsset asset(String credentialsKey) { - return new LLMVertexAIAsset(AssetIdentity.of("g", "env", "G", LLMVertexAIModule.TYPE), "https://monitoring.googleapis.com", "projects/my-project", credentialsKey, + return new LLMVertexAIAsset(AssetIdentity.of("g", "env", LLMVertexAIModule.TYPE), "https://monitoring.googleapis.com", "projects/my-project", credentialsKey, new LLMVertexAIProfile(500, List.of("gemini-2.5-flash"))); } } diff --git a/module/src/test/java/tech/illuin/wombat/module/llm_vertexai/LLMVertexAIModuleTest.java b/module/src/test/java/tech/illuin/wombat/module/llm_vertexai/LLMVertexAIModuleTest.java index 6845e28..c626889 100644 --- a/module/src/test/java/tech/illuin/wombat/module/llm_vertexai/LLMVertexAIModuleTest.java +++ b/module/src/test/java/tech/illuin/wombat/module/llm_vertexai/LLMVertexAIModuleTest.java @@ -66,7 +66,7 @@ private static WombatServices services(Map environment) private static LLMVertexAIAsset asset(String credentialsKey) { - return new LLMVertexAIAsset(AssetIdentity.of("g", "env", "G", LLMVertexAIModule.TYPE), "https://monitoring.googleapis.com", "projects/my-project", credentialsKey, + return new LLMVertexAIAsset(AssetIdentity.of("g", "env", LLMVertexAIModule.TYPE), "https://monitoring.googleapis.com", "projects/my-project", credentialsKey, new LLMVertexAIProfile(500, List.of("gemini-2.5-flash"))); } } diff --git a/module/src/test/java/tech/illuin/wombat/module/llm_vertexai/activity/LLMVertexAIActivityResolverTest.java b/module/src/test/java/tech/illuin/wombat/module/llm_vertexai/activity/LLMVertexAIActivityResolverTest.java index 2764ab9..d265305 100644 --- a/module/src/test/java/tech/illuin/wombat/module/llm_vertexai/activity/LLMVertexAIActivityResolverTest.java +++ b/module/src/test/java/tech/illuin/wombat/module/llm_vertexai/activity/LLMVertexAIActivityResolverTest.java @@ -45,7 +45,7 @@ class LLMVertexAIActivityResolverTest private final GoogleClient client = mock(GoogleClient.class); private final LLMVertexAIAsset asset = new LLMVertexAIAsset( - AssetIdentity.of("llm-google", "prod", "Google LLM", LLMVertexAIModule.TYPE), "https://monitoring.googleapis.com", PROJECT, null, + AssetIdentity.of("llm-google", "prod", LLMVertexAIModule.TYPE), "https://monitoring.googleapis.com", PROJECT, null, new LLMVertexAIProfile(500, List.of(MODEL)) ); private final LLMVertexAIActivityResolver resolver = new LLMVertexAIActivityResolver(this.client); diff --git a/module/src/test/java/tech/illuin/wombat/module/llm_vertexai/connector/GoogleClientConfigTest.java b/module/src/test/java/tech/illuin/wombat/module/llm_vertexai/connector/GoogleClientConfigTest.java index 976bd74..719ba10 100644 --- a/module/src/test/java/tech/illuin/wombat/module/llm_vertexai/connector/GoogleClientConfigTest.java +++ b/module/src/test/java/tech/illuin/wombat/module/llm_vertexai/connector/GoogleClientConfigTest.java @@ -115,7 +115,7 @@ private static SecretResolver secrets(Map environment) private static LLMVertexAIAsset asset(String id, String credentialsKey) { - return new LLMVertexAIAsset(AssetIdentity.of(id, "env", id, LLMVertexAIModule.TYPE), "https://monitoring.googleapis.com", "projects/my-project", credentialsKey, + return new LLMVertexAIAsset(AssetIdentity.of(id, "env", LLMVertexAIModule.TYPE), "https://monitoring.googleapis.com", "projects/my-project", credentialsKey, new LLMVertexAIProfile(500, List.of("gemini-2.5-flash"))); }