Git Product home page Git Product logo

Comments (3)

kmjbutler avatar kmjbutler commented on August 23, 2024

Hi Vincent,

Thank you for taking the time to e-mail us your library. I agree with
you that your approach is much cleaner. Is it OK if we include your
library on our list of 3rd-party libraries here:
http://support.kissmetrics.com/apis/other?

-John

On Wed, Aug 24, 2011 at 10:57 PM, vbrendel
[email protected]
wrote:

Hi KM,

I had a few issues with your gem and eventually decided it was easier to create my own code to interface with Kissmetrics and would like to share it with you what the problems were and what I came up with.

The first problem was around environments and the use of logs and cron and I had to work around the fact that the code executes differently in production. I would recommend that rather than hardcode behavior around environments to make this configurable instead. For example, I use an environment called 'staging' which should behave exactly like production, except it has a different name.

Also, as you may know, Heroku only allows hourly cron jobs so that meant the stats were not instant. And then I didn't see a distinct advantage to holding the logs in a file since they are sent one-by-one anyway. Finally, using the file system, in particular the tmp dir for storing the log posed the potential problem of logs possibly being deleted by automatic cleanup processes.

Because Heroku works well with delayed_job, that was my preferred method for sending metrics.

So please find my version of the KM class in the gist below. It's a bit of a work in progress since it only does what I need but so far it works well for me.

https://gist.github.com/1170061 (required: delayed_job and httparty gems)

Thanks,
Vincent

Reply to this email directly or view it on GitHub:
#3

from km.

vbrendel avatar vbrendel commented on August 23, 2024

Hi John,

Absolutely, and I've now started a repo for it, so please feel free to
reference: https://github.com/vbrendel/delayed_km

Cheers,
Vincent

On Sat, Aug 27, 2011 at 1:56 AM, kmjbutler <
[email protected]>wrote:

Hi Vincent,

Thank you for taking the time to e-mail us your library. I agree with
you that your approach is much cleaner. Is it OK if we include your
library on our list of 3rd-party libraries here:
http://support.kissmetrics.com/apis/other?

-John

On Wed, Aug 24, 2011 at 10:57 PM, vbrendel
[email protected]
wrote:

Hi KM,

I had a few issues with your gem and eventually decided it was easier to
create my own code to interface with Kissmetrics and would like to share it
with you what the problems were and what I came up with.

The first problem was around environments and the use of logs and cron
and I had to work around the fact that the code executes differently in
production. I would recommend that rather than hardcode behavior around
environments to make this configurable instead. For example, I use an
environment called 'staging' which should behave exactly like production,
except it has a different name.

Also, as you may know, Heroku only allows hourly cron jobs so that meant
the stats were not instant. And then I didn't see a distinct advantage to
holding the logs in a file since they are sent one-by-one anyway. Finally,
using the file system, in particular the tmp dir for storing the log posed
the potential problem of logs possibly being deleted by automatic cleanup
processes.

Because Heroku works well with delayed_job, that was my preferred method
for sending metrics.

So please find my version of the KM class in the gist below. It's a bit
of a work in progress since it only does what I need but so far it works
well for me.

https://gist.github.com/1170061 (required: delayed_job and httparty
gems)

Thanks,
Vincent

Reply to this email directly or view it on GitHub:
#3

Reply to this email directly or view it on GitHub:
#3 (comment)

from km.

kmjbutler avatar kmjbutler commented on August 23, 2024

I've added it to our list: http://support.kissmetrics.com/apis/other.
Thanks again for your efforts!

-John

On Fri, Aug 26, 2011 at 6:08 PM, vbrendel
[email protected]
wrote:

Hi John,

Absolutely, and I've now started a repo for it, so please feel free to
reference: https://github.com/vbrendel/delayed_km

Cheers,
Vincent

On Sat, Aug 27, 2011 at 1:56 AM, kmjbutler <
[email protected]>wrote:

Hi Vincent,

Thank you for taking the time to e-mail us your library. I agree with
you that your approach is much cleaner. Is it OK if we include your
library on our list of 3rd-party libraries here:
http://support.kissmetrics.com/apis/other?

-John

On Wed, Aug 24, 2011 at 10:57 PM, vbrendel
[email protected]
wrote:

Hi KM,

I had a few issues with your gem and eventually decided it was easier to
create my own code to interface with Kissmetrics and would like to share it
with you what the problems were and what I came up with.

The first problem was around environments and the use of logs and cron
and I had to work around the fact that the code executes differently in
production. I would recommend that rather than hardcode behavior around
environments to make this configurable instead. For example, I use an
environment called 'staging' which should behave exactly like production,
except it has a different name.

Also, as you may know, Heroku only allows hourly cron jobs so that meant
the stats were not instant. And then I didn't see a distinct advantage to
holding the logs in a file since they are sent one-by-one anyway. Finally,
using the file system, in particular the tmp dir for storing the log posed
the potential problem of logs possibly being deleted by automatic cleanup
processes.

Because Heroku works well with delayed_job, that was my preferred method
for sending metrics.

So please find my version of the KM class in the gist below. It's a bit
of a work in progress since it only does what I need but so far it works
well for me.

https://gist.github.com/1170061 (required: delayed_job and httparty
gems)

Thanks,
Vincent

Reply to this email directly or view it on GitHub:
#3

Reply to this email directly or view it on GitHub:
#3 (comment)

Reply to this email directly or view it on GitHub:
#3 (comment)

from km.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.