From 9035e810145304f3eef1f72e4e6438f5c0c58cc9 Mon Sep 17 00:00:00 2001 From: Jason Harley Date: Wed, 6 Mar 2024 16:33:38 -0500 Subject: [PATCH] feat: add Classic Ingest Key support --- beeline/__init__.py | 5 +---- poetry.lock | 13 +++++++------ pyproject.toml | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/beeline/__init__.py b/beeline/__init__.py index 70b6d08..a506ca1 100644 --- a/beeline/__init__.py +++ b/beeline/__init__.py @@ -5,7 +5,7 @@ import socket from contextlib import contextmanager -from libhoney import Client +from libhoney import Client, IsClassicKey from beeline.trace import SynchronousTracer from beeline.version import VERSION from beeline import internal @@ -75,9 +75,6 @@ def __init__(self, if debug: self._init_logger() - def IsClassicKey(writekey): - return len(writekey) == 32 - # allow setting some values from the environment if not writekey: writekey = os.environ.get('HONEYCOMB_WRITEKEY', '') diff --git a/poetry.lock b/poetry.lock index 461cccb..f7e3073 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. [[package]] name = "asgiref" @@ -349,18 +349,19 @@ files = [ [[package]] name = "libhoney" -version = "2.3.0" +version = "2.4.0" description = "Python library for sending data to Honeycomb" optional = false python-versions = ">=3.7,<4" files = [ - {file = "libhoney-2.3.0-py3-none-any.whl", hash = "sha256:04b7358513ff3eb11c07c6d4dd726de45b93a918ffe42748710c0e53a616c04a"}, - {file = "libhoney-2.3.0.tar.gz", hash = "sha256:c1ffa35a22061bb6e5c1f9711da39055cf905a9588899626303b73b9cd398772"}, + {file = "libhoney-2.4.0-py3-none-any.whl", hash = "sha256:02e6eb2b139e96c1236fbaf2a6123db854310fe9439eda181db1e570388665fd"}, + {file = "libhoney-2.4.0.tar.gz", hash = "sha256:94fc6c6eebd66167a1a5291e8a5d5fed5079cf8ac1afed14cf85d900723cb4b0"}, ] [package.dependencies] requests = ">=2.24.0,<3.0.0" -statsd = ">=3.3.0,<4.0.0" +statsd = ">=3.3,<5.0" +urllib3 = ">=1.26,<3.0" [[package]] name = "markupsafe" @@ -773,4 +774,4 @@ testing = ["func-timeout", "jaraco.itertools", "pytest (>=6)", "pytest-black (>= [metadata] lock-version = "2.0" python-versions = ">=3.7, <4" -content-hash = "4d79ed2952db8120852a9952414dee42f3061c8e11a369d277ab71c95be64619" +content-hash = "cc6881cd58a29c87e80df51e5237eb9cd9014b75a963b89abe50f9fe5e72e540" diff --git a/pyproject.toml b/pyproject.toml index fcf82f6..45d8264 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ repository = "https://github.com/honeycombio/beeline-python" [tool.poetry.dependencies] python = ">=3.7, <4" -libhoney = "^2.3.0" +libhoney = "^2.4.0" wrapt = "^1.12.1" [tool.poetry.dev-dependencies] mock = "^5.0.2"