Skip to content

Commit a5ea693

Browse files
committed
Drop zone and tagging support until we have a usable entity
Signed-off-by: Ferenc Géczi <[email protected]>
1 parent eaa5b04 commit a5ea693

File tree

2 files changed

+0
-41
lines changed

2 files changed

+0
-41
lines changed

instana/collector/helpers/eks/process.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ def collect_metrics(self, **kwargs):
2323
plugin_data = super(EKSFargateProcessHelper, self).collect_metrics(**kwargs)
2424
plugin_data["data"]["containerType"] = "docker"
2525

26-
if self.collector.agent.options.zone is not None:
27-
plugin_data["data"]["instanaZone"] = self.collector.agent.options.zone
28-
29-
if self.collector.agent.options.tags is not None:
30-
plugin_data["data"]["tags"] = self.collector.agent.options.tags
31-
3226
if kwargs.get("with_snapshot"):
3327
plugin_data["data"]["com.instana.plugin.host.name"] = get_pod_name()
3428
except Exception:

tests/platforms/test_eksfargate_collector.py

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -78,38 +78,3 @@ def test_no_instana_zone(self):
7878
self.create_agent_and_setup_tracer()
7979
self.assertIsNone(self.agent.options.zone)
8080

81-
def test_instana_zone(self):
82-
os.environ["INSTANA_ZONE"] = "YellowDog"
83-
self.create_agent_and_setup_tracer()
84-
85-
self.assertEqual(self.agent.options.zone, "YellowDog")
86-
87-
payload = self.agent.collector.prepare_payload()
88-
self.assertTrue(payload)
89-
90-
plugins = payload['metrics']['plugins']
91-
self.assertIsInstance(plugins, list)
92-
93-
process_plugin = payload['metrics']['plugins'][0]
94-
self.assertTrue(process_plugin)
95-
self.assertIn("data", process_plugin)
96-
self.assertIn("instanaZone", process_plugin["data"])
97-
self.assertEqual(process_plugin["data"]["instanaZone"], "YellowDog")
98-
99-
def test_custom_tags(self):
100-
os.environ["INSTANA_TAGS"] = "love,war=1,games"
101-
self.create_agent_and_setup_tracer()
102-
self.assertTrue(hasattr(self.agent.options, 'tags'))
103-
self.assertDictEqual(self.agent.options.tags, {"love": None, "war": "1", "games": None})
104-
105-
payload = self.agent.collector.prepare_payload()
106-
107-
self.assertTrue(payload)
108-
task_plugin = None
109-
process_plugin = payload['metrics']['plugins'][0]
110-
self.assertTrue(process_plugin)
111-
self.assertIn("tags", process_plugin["data"])
112-
tags = process_plugin["data"]["tags"]
113-
self.assertEqual(tags["war"], "1")
114-
self.assertIsNone(tags["love"])
115-
self.assertIsNone(tags["games"])

0 commit comments

Comments
 (0)