{"id":18811756,"url":"https://github.com/logicmonitor/lm-telemetry-sdk-ruby","last_synced_at":"2026-01-11T14:30:20.093Z","repository":{"id":41834027,"uuid":"447122860","full_name":"logicmonitor/lm-telemetry-sdk-ruby","owner":"logicmonitor","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-12T16:36:02.000Z","size":42,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-12-30T00:13:28.783Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/logicmonitor.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-12T07:46:49.000Z","updated_at":"2022-04-27T07:12:51.000Z","dependencies_parsed_at":"2024-11-07T23:29:13.855Z","dependency_job_id":"fd7d78f6-5e22-4707-9ff7-b6ee4f0e1199","html_url":"https://github.com/logicmonitor/lm-telemetry-sdk-ruby","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logicmonitor%2Flm-telemetry-sdk-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logicmonitor%2Flm-telemetry-sdk-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logicmonitor%2Flm-telemetry-sdk-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logicmonitor%2Flm-telemetry-sdk-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/logicmonitor","download_url":"https://codeload.github.com/logicmonitor/lm-telemetry-sdk-ruby/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239748248,"owners_count":19690232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T23:27:33.845Z","updated_at":"2026-01-11T14:30:20.039Z","avatar_url":"https://github.com/logicmonitor.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lmtelemetry-sdk-ruby, a ruby sdk for resource detection by LogicMonitor\n\n_NOTE: This is in private beta._\n\n### lmtelemetry-sdk-ruby\n\nlmtelemetry-sdk-ruby has implementation for cloud specific resource detectors.\n\n## Prerequisites\nThis package is published on GitHub Packages Rubygems registry, you need to follow certain steps to fetch/install this. Please follow these steps to setup your project to use this package.\n\nSet a GitHub Personal Access Token to get lm-telemetry-sdk-ruby from GitHub Package registry.\nGenerate a personal access token for your github account with repo and read:packages scope. Follow these steps (https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)\n\n### Modify your .gemrc file\nIf you have not created .gemrc in your project, just create a blank file named .gemrc in the root of your project.\n\nAdd the following in .gemrc\n```\n---\n:backtrace: false\n:bulk_threshold: 1000\n:sources:\n- https://rubygems.org/\n- https://USERNAME:TOKEN@rubygems.pkg.github.com/logicmonitor/\n:update_sources: true\n:verbose: true\n```\n##### USERNAME: Github username, TOKEN: Personal access token\n## Installation\n\nIf you use Bundler, include 'lm-telemetry-sdk-ruby' to your application's Gemfile:\n\n```ruby\ngem 'lm-telemetry-sdk-ruby'\n```\n\nAnd execute:\n\n    $ bundle install\n\nOR install the gem as:\n\n    $ gem install lm-telemetry-sdk-ruby\n\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Usage\n\n### Resource detection for cloud environments\n\n#### ***# For a specific platform***\n\n##### Amazon Web Services (AWS) \n\n###### EC2\n```\n    require 'lmtelemetry/resource/detectors/aws/ec2/ec2'\n    ...\n    OpenTelemetry::SDK.configure do |c|\n      c.service_name = 'ruby-ec2-function'\n      c.resource = LMTelemetry::Resource::Detectors::AwsEc2.detect\n      c.use_all\n    end\n```\n##### List of the detected attributes\n\nAttributes | Description |\n---        | ---         |\ncloud.provider | Name of the cloud provider\ncloud.platform | The cloud platform in use\ncloud.account.id | The cloud account ID the resource is assigned to\ncloud.region | The geographical region the resource is running\ncloud.availability_zone | Represents the zone where the resource is running\nhost.id | The instance_id assigned by the cloud provider\nhost.type | Type of host. This must be the machine type\nhost.image.id | VM image ID\nhost.name | Name of the host\n\n\n###### ECS\n```\n    require 'lmtelemetry/resource/detectors/aws/ecs/ecs'\n    ...\n    OpenTelemetry::SDK.configure do |c|\n      c.service_name = 'ruby-ecs-function'\n      c.resource = LMTelemetry::Resource::Detectors::AwsEcs.detect\n      c.use_all\n    end\n```\n##### List of the detected attributes\n\nAttributes | Description |\n---        | ---         |\ncloud.provider | Name of the cloud provider\ncloud.platform | The cloud platform in use\ncontainer.id | Container ID\ncontainer.name | Container name used by container runtime\ncontainer.image.name | Name of the image the container was built on\ncontainer.image.tag | Container image tag\naws.ecs.task.arn | The ARN of an ECS task definition\naws.ecs.task.family | The task definition family this task definition is a member of\naws.ecs.task.revision | The revision for this task definition\n\n\n###### EKS\n```\n    require 'lmtelemetry/resource/detectors/aws/eks/eks'\n    ...\n    OpenTelemetry::SDK.configure do |c|\n      c.service_name = 'ruby-eks-function'\n      c.resource = LMTelemetry::Resource::Detectors::AwsEks.detect\n      c.use_all\n    end\n```\n##### List of the detected attributes\n\nAttributes | Description |\n---        | ---         |\ncloud.provider | Name of the cloud provider\ncloud.platform | The cloud platform in use\ncontainer.id | Container ID\nk8s.cluster.name | The name of the cluster\n\n\n###### Lambda\n```\n    require 'lmtelemetry/resource/detectors/aws/lambda/lambda'\n    ...\n    OpenTelemetry::SDK.configure do |c|\n      c.service_name = 'ruby-lambda-function'\n      c.resource = LMTelemetry::Resource::Detectors::AwsLambda.detect(context)\n      c.use_all\n    end\n```\n##### List of the detected attributes\n\nAttributes | Description |\n---        | ---         |\ncloud.provider | Name of the cloud provider\ncloud.platform | The cloud platform in use\ncloud.region | The geographical region wher Lambda is running\nfaas.name | The name of the function\nfaas.version | The immutable version of the function being executed\n\n\n##### Google Cloud Platform (GCP)\n\nIt supports Google Compute Engine(GCE), Google Kubernetes Engine(GKE) and Google Cloud Functions(GCF).\n\n```  \n    require 'lmtelemetry/resource/detectors/gcp/gcp'\n    ...\n    OpenTelemetry::SDK.configure do |c|\n      c.service_name = 'ruby-gc-function'\n      c.resource = LMTelemetry::Resource::Detectors::GoogleCloudPlatform.detect\n      c.use_all\n    end\n```\n##### **List of the detected attributes**\n##### GCE\n\nAttributes | Description |\n---        | ---         |\ncloud.provider | Name of the cloud provider\ncloud.account.id | The cloud account ID the resource is assigned to\ncloud.region | The geographical region the resource is running\ncloud.availability_zone | Represents the zone where the resource is running\nhost.id | The instance_id assigned by the cloud provider\nhost.name | Name of the host\n\n##### GKE\n\nAttributes | Description |\n---        | ---         |\nk8s.cluster.name | The name of the cluster\nk8s.container.name | The name of the Container from Pod specification, must be unique within a Pod. \nk8s.pod.name | The name of the Pod\nk8s.node.name | The name of the Node\nk8s.namespace.name | The name of the namespace that the pod is running in\n\n##### GCF\n\nAttributes | Description |\n---        | ---         |\ncloud.provider | Name of the cloud provider\ncloud.account.id | The cloud account ID the resource is assigned to\ncloud.region | The geographical region wher GCF is running\ncloud.availability_zone | Represents the zone where the resource is running\nfaas.name | The name of the function\nfaas.version | The immutable version of the function being executed\n\n#### ***# If you would like to run all the detectors available***\n\n```  \n    require 'lmtelemetry/resource/detectors'\n    ...\n    OpenTelemetry::SDK.configure do |c|\n      c.service_name = 'ruby-gc-function'\n      c.resource = LMTelemetry::Resource::Detectors::Autodetector.detect\n      c.use_all\n    end\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogicmonitor%2Flm-telemetry-sdk-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flogicmonitor%2Flm-telemetry-sdk-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogicmonitor%2Flm-telemetry-sdk-ruby/lists"}